Ruby API is similar to Python API. I this section show samples in Ruby. If you need detail information see Python API reference.
berryMQ provides module methods following() and auto_twitter(). They works like Class.public and Class.private and so on. Use this like following:
require 'berrymq'
class Logger
include BerryMQ::Follower
following("*:log")
def receive_log(message)
...
end
end
Class.public keeps effect until other module method will be called, But this functions effect only the next method definition.
See also
Warning
Ruby implementation uses module including mechanism to class. So you can’t set module function receiver like Python.
You can use berrymq.twitter() function like this:
require 'berrymq'
def on_button_pressed
BerryMQ::twitter("on_button_pressed:log")
.
.
end
See also
Note
In future release, if last paramter is Hash, it will pass as kwargs.
now writing...