Module: Yasm::Action

Defined in:
lib/yasm/action.rb

Defined Under Namespace

Modules: ClassMethods

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#contextObject

Returns the value of attribute context.



3
4
5
# File 'lib/yasm/action.rb', line 3

def context
  @context
end

#state_containerObject

Returns the value of attribute state_container.



3
4
5
# File 'lib/yasm/action.rb', line 3

def state_container
  @state_container
end

Class Method Details

.included(base) ⇒ Object



5
6
7
# File 'lib/yasm/action.rb', line 5

def self.included(base)
  base.extend ClassMethods
end

Instance Method Details

#executeObject



25
26
27
# File 'lib/yasm/action.rb', line 25

def execute
  true
end

#trigger(state) ⇒ Object



21
22
23
# File 'lib/yasm/action.rb', line 21

def trigger(state)
  Yasm::Manager.change_state :to => state, :on => state_container
end

#triggersObject



17
18
19
# File 'lib/yasm/action.rb', line 17

def triggers
  self.class.trigger_state
end