Class: Xtb::Http::Command::Request

Inherits:
Struct
  • Object
show all
Defined in:
lib/xtb/http/command.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#argumentsObject

Returns the value of attribute arguments

Returns:

  • (Object)

    the current value of arguments



12
13
14
# File 'lib/xtb/http/command.rb', line 12

def arguments
  @arguments
end

#commandObject

Returns the value of attribute command

Returns:

  • (Object)

    the current value of command



12
13
14
# File 'lib/xtb/http/command.rb', line 12

def command
  @command
end

Instance Method Details

#to_json(*_args) ⇒ Object



13
14
15
16
# File 'lib/xtb/http/command.rb', line 13

def to_json(*_args)
  arguments = transform_keys(self.arguments) if self.arguments
  JSON.dump({ command:, arguments: }.compact)
end