Class: StateMachine::YARD::Handlers::Transition
- Inherits:
-
Base
- Object
- YARD::Handlers::Ruby::Base
- Base
- StateMachine::YARD::Handlers::Transition
- Defined in:
- lib/state_machine/yard/handlers/transition.rb
Overview
Handles and processes #transition
Instance Method Summary collapse
Instance Method Details
#process ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/state_machine/yard/handlers/transition.rb', line 8 def process if [StateMachine::Machine, StateMachine::Event, StateMachine::State].include?(owner.class) = {} # Extract requirements ast = statement.parameters.first ast.children.each do |assoc| # Skip conditionals next if %w(if unless).include?(assoc[0].jump(:ident).source) [extract_requirement(assoc[0])] = extract_requirement(assoc[1]) end owner.transition() end end |