Class: Cinc::Client::Command

Inherits:
Object
  • Object
show all
Defined in:
lib/cinc/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, arguments) ⇒ Command

Returns a new instance of Command.



39
40
41
42
# File 'lib/cinc/client.rb', line 39

def initialize(name, arguments)
  @name = name
  @arguments = arguments
end

Instance Attribute Details

#argumentsObject

Returns the value of attribute arguments.



37
38
39
# File 'lib/cinc/client.rb', line 37

def arguments
  @arguments
end

#nameObject

Returns the value of attribute name.



37
38
39
# File 'lib/cinc/client.rb', line 37

def name
  @name
end

Instance Method Details

#to_jsonObject



44
45
46
47
48
49
# File 'lib/cinc/client.rb', line 44

def to_json
  {
    name: name,
    arguments: arguments
  }.to_json
end