Class: SkypeR::Parser::CallCommand

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

Overview

<call_command> := CALL <target>[, <target>]*

Instance Attribute Summary

Attributes inherited from CommandBase

#response

Instance Method Summary collapse

Constructor Details

#initializeCallCommand

Returns a new instance of CallCommand.



344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
# File 'lib/skyper/command.rb', line 344

def initialize
  @parser = lambda do
    Yaparc::SeqParser.new(
                          Yaparc::Symbol.new("CALL"),
                          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
end