Class: Sysdo::Dsl
- Inherits:
-
Object
- Object
- Sysdo::Dsl
- Defined in:
- lib/sysdo/dsl.rb
Instance Attribute Summary collapse
-
#event_sources ⇒ Object
readonly
Returns the value of attribute event_sources.
Instance Method Summary collapse
-
#initialize ⇒ Dsl
constructor
A new instance of Dsl.
- #on(event_source, &action) ⇒ Object
Constructor Details
#initialize ⇒ Dsl
Returns a new instance of Dsl.
5 6 7 |
# File 'lib/sysdo/dsl.rb', line 5 def initialize @event_sources = [] end |
Instance Attribute Details
#event_sources ⇒ Object (readonly)
Returns the value of attribute event_sources.
3 4 5 |
# File 'lib/sysdo/dsl.rb', line 3 def event_sources @event_sources end |
Instance Method Details
#on(event_source, &action) ⇒ Object
9 10 11 12 |
# File 'lib/sysdo/dsl.rb', line 9 def on(event_source, &action) event_source.on_fire = action @event_sources << event_source end |