Class: Sysdo::Dsl

Inherits:
Object
  • Object
show all
Defined in:
lib/sysdo/dsl.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeDsl

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_sourcesObject (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