Class: SkypeR::Parser::ChatCreateCommand
- Inherits:
-
CommandBase
- Object
- Yaparc::AbstractParser
- CommandBase
- SkypeR::Parser::ChatCreateCommand
- Defined in:
- lib/skyper/command.rb
Overview
<chat_create_command> := CHAT CREATE <target>[, <target>]* <chat_create_response> := CHAT <chat_id> STATUS <value> <chat_message_command> := CHATMESSAGE <chat_id> <message> <chat_message_response> := CHATMESSAGE <id> STATUS SENDING
Instance Attribute Summary
Attributes inherited from CommandBase
Instance Method Summary collapse
-
#initialize ⇒ ChatCreateCommand
constructor
A new instance of ChatCreateCommand.
Constructor Details
#initialize ⇒ ChatCreateCommand
Returns a new instance of ChatCreateCommand.
396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 |
# File 'lib/skyper/command.rb', line 396 def initialize @parser = lambda do Yaparc::SeqParser.new( Yaparc::Symbol.new("CHAT"), Yaparc::Symbol.new("CREATE"), Target.new, Yaparc::ManyParser.new( Yaparc::SeqParser.new(Yaparc::Symbol.new(','), Target.new) do |_, target| [target] end, [] ) ) do |_,_,target,targets| {:command_instance => self, :targets => [target] + targets} end end @response = ChatCreateResponse.new end |