Class: StateMachine::YARD::Handlers::State

Inherits:
Base
  • Object
show all
Defined in:
lib/state_machine/yard/handlers/state.rb

Overview

Handles and processes #state

Instance Method Summary collapse

Instance Method Details

#processObject



8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/state_machine/yard/handlers/state.rb', line 8

def process
  if owner.is_a?(StateMachine::Machine)
    handler = self
    statement = self.statement
    names = extract_node_names(statement.parameters(false))
    
    names.each do |name|
      owner.state(name) do
        # Parse the block
        handler.parse_block(statement.last.last, :owner => self)
      end
    end
  end
end