Class: SkypeR::Parser::CommandStatement
- Inherits:
-
CommandBase
- Object
- Yaparc::AbstractParser
- CommandBase
- SkypeR::Parser::CommandStatement
- Defined in:
- lib/skyper/command.rb
Overview
<command_statement> := [<command_id>] <command>
Instance Attribute Summary
Attributes inherited from CommandBase
Instance Method Summary collapse
-
#initialize ⇒ CommandStatement
constructor
A new instance of CommandStatement.
Constructor Details
#initialize ⇒ CommandStatement
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 |