Class: TelosLWCP::Command::Incoming

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(string) ⇒ Incoming

Returns a new instance of Incoming.



34
35
36
37
38
39
40
41
42
# File 'lib/telos_lwcp/command.rb', line 34

def initialize(string)
  parts = string.match(/\A(?<command>\S+) (?<object>\S+) (?<arguments>.*)\Z/)
  self.command = parts[:command]
  self.object = parts[:object]
  self.arguments = {}
  self.system_items = {}

  parse_extra_arguments parts[:arguments]
end

Instance Attribute Details

#argumentsObject

Returns the value of attribute arguments.



32
33
34
# File 'lib/telos_lwcp/command.rb', line 32

def arguments
  @arguments
end

#commandObject

Returns the value of attribute command.



32
33
34
# File 'lib/telos_lwcp/command.rb', line 32

def command
  @command
end

#objectObject

Returns the value of attribute object.



32
33
34
# File 'lib/telos_lwcp/command.rb', line 32

def object
  @object
end

#system_itemsObject

Returns the value of attribute system_items.



32
33
34
# File 'lib/telos_lwcp/command.rb', line 32

def system_items
  @system_items
end