文件名称:eventmachine-distributed-notification:监视 OS X 分布式通知的 EventMachine 扩展
文件大小:30KB
文件格式:ZIP
更新时间:2024-07-18 10:20:26
Ruby
EventMachine的分布式通知 用于观看/发布 OS X 的扩展 简介 require 'eventmachine-distributed-notification' 观看通知 class Watcher < EM :: DistributedNotificationWatch def notify ( name , user_info ) puts 'now playing %s' % [ user_info [ 'Artist' ], user_info [ 'Name' ]]. join ( ' - ' ) end end EM . run { EM . watch_distributed_notification ( 'com.apple.iTunes.playerInfo' , Watcher ) } 帖子通知 EM . run { EM .
【文件预览】:
eventmachine-distributed-notification-master
----Rakefile(990B)
----eventmachine-distributed-notification.gemspec(1KB)
----README.rdoc(2KB)
----Gemfile(38B)
----ext()
--------observer_native()
--------poster_native()
--------lib()
----.rspec(8B)
----examples()
--------server.rb(174B)
--------client.rb(213B)
----spec()
--------eventmachine-distributed-notification_spec.rb(3KB)
--------spec_helper.rb(387B)
----.gitignore(869B)
----lib()
--------eventmachine-distributed-notification()
--------eventmachine-distributed-notification.rb(1KB)
----LICENSE.txt(1KB)