Class: SkypeR::Parser::CommandStatement

Inherits:
CommandBase
  • Object
show all
Defined in:
lib/skyper/command.rb

Overview

<command_statement> := [<command_id>] <command>

Instance Attribute Summary

Attributes inherited from CommandBase

#response

Instance Method Summary collapse

Constructor Details

#initializeCommandStatement

Returns a new instance of CommandStatement.



24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/skyper/command.rb', line 24

def initialize
  @parser = lambda do
    Yaparc::SeqParser.new(Yaparc::ZeroOneParser.new(CommandID.new),
                          Command.new) do |command_id, command|
      command
#             if command_id == []
#               {:command_id => nil,  :command => command}
#             else
#               {:command_id => command_id, :command => command}
#             end
    end
  end
end