Sha256: a8651a731d9e0b0de3c04cab37e9f22ed33f7635b746efa1cfdb62290cbece50

Contents?: true

Size: 647 Bytes

Versions: 11

Compression:

Stored size: 647 Bytes

Contents

module EnumStateMachine
  module YARD
    module Handlers
      # Handles and processes #event
      class Event < Base
        handles method_call(:event)
        
        def process
          if owner.is_a?(EnumStateMachine::Machine)
            handler = self
            statement = self.statement
            names = extract_node_names(statement.parameters(false))
            
            names.each do |name|
              owner.event(name) do
                # Parse the block
                handler.parse_block(statement.last.last, :owner => self)
              end
            end
          end
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
enum_state_machine-0.8.0 lib/enum_state_machine/yard/handlers/event.rb
enum_state_machine-0.7.0 lib/enum_state_machine/yard/handlers/event.rb
enum_state_machine-0.6.0 lib/enum_state_machine/yard/handlers/event.rb
enum_state_machine-0.5.0 lib/enum_state_machine/yard/handlers/event.rb
enum_state_machine-0.4.1 lib/enum_state_machine/yard/handlers/event.rb
enum_state_machine-0.4.0 lib/enum_state_machine/yard/handlers/event.rb
enum_state_machine-0.3.0 lib/enum_state_machine/yard/handlers/event.rb
enum_state_machine-0.2.0 lib/enum_state_machine/yard/handlers/event.rb
enum_state_machine-0.1.1 lib/enum_state_machine/yard/handlers/event.rb
enum_state_machine-0.1.0 lib/enum_state_machine/yard/handlers/event.rb
enum_state_machine-0.0.1 lib/enum_state_machine/yard/handlers/event.rb