Class: Blabber::Mock
Instance Attribute Summary collapse
-
#opts ⇒ Object
readonly
Returns the value of attribute opts.
Instance Method Summary collapse
-
#initialize(opts) ⇒ Mock
constructor
A new instance of Mock.
- #loglevels ⇒ Object
- #speak(message, loglevel, opts) ⇒ Object
Methods included from Channel
Constructor Details
#initialize(opts) ⇒ Mock
Returns a new instance of Mock.
10 11 12 |
# File 'lib/blabber/mock.rb', line 10 def initialize(opts) @opts = opts end |
Instance Attribute Details
#opts ⇒ Object (readonly)
Returns the value of attribute opts.
8 9 10 |
# File 'lib/blabber/mock.rb', line 8 def opts @opts end |
Instance Method Details
#loglevels ⇒ Object
14 15 16 |
# File 'lib/blabber/mock.rb', line 14 def loglevels @opts['loglevels'] end |
#speak(message, loglevel, opts) ⇒ Object
18 19 20 |
# File 'lib/blabber/mock.rb', line 18 def speak(, loglevel, opts) @opts['log'].set_data({"message" => , "loglevel" => loglevel, "opts" => opts}) end |