Class: Sunsap::Reporter
- Inherits:
-
Object
- Object
- Sunsap::Reporter
- Defined in:
- lib/sunsap.rb
Instance Method Summary collapse
-
#initialize(reportername) ⇒ Reporter
constructor
A new instance of Reporter.
- #queue ⇒ Object
Constructor Details
#initialize(reportername) ⇒ Reporter
Returns a new instance of Reporter.
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/sunsap.rb', line 6 def initialize(reportername) @queue = [] self.class.send :define_method, "send_#{reportername}_message" do |m| @queue.push(m) end def queue @queue end end |
Instance Method Details
#queue ⇒ Object
12 13 14 |
# File 'lib/sunsap.rb', line 12 def queue @queue end |