class States::Dsl::Parser
Attributes
state_machines[R]
Public Class Methods
load(filename)
click to toggle source
# File lib/states/dsl.rb, line 44 def self.load(filename) parser = new parser.instance_eval(File.read(filename), filename) parser end
new()
click to toggle source
# File lib/states/dsl.rb, line 40 def initialize @state_machines = [] end
Public Instance Methods
state_machine(options={}, &block)
click to toggle source
# File lib/states/dsl.rb, line 50 def state_machine(options={}, &block) sm = StateMachine.new(options) sm.instance_eval(&block) @state_machines << sm sm end