Class: CapitalIQ::Request

Inherits:
Object
  • Object
show all
Defined in:
lib/capital-iq/request.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(function, identifier, mnemonic, properties = nil) ⇒ Request

Returns a new instance of Request.



5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/capital-iq/request.rb', line 5

def initialize(function, identifier, mnemonic, properties = nil)
  @function = function
  @identifier = identifier
  @mnemonic = mnemonic
  @properties = properties

  @hash = {
      function: self.function,
      identifier: self.identifier,
      mnemonic: self.mnemonic
  }
  @hash[:properties] = properties unless properties.nil?
end

Instance Attribute Details

#functionObject (readonly)

Returns the value of attribute function.



3
4
5
# File 'lib/capital-iq/request.rb', line 3

def function
  @function
end

#identifierObject (readonly)

Returns the value of attribute identifier.



3
4
5
# File 'lib/capital-iq/request.rb', line 3

def identifier
  @identifier
end

#mnemonicObject (readonly)

Returns the value of attribute mnemonic.



3
4
5
# File 'lib/capital-iq/request.rb', line 3

def mnemonic
  @mnemonic
end

#propertiesObject (readonly)

Returns the value of attribute properties.



3
4
5
# File 'lib/capital-iq/request.rb', line 3

def properties
  @properties
end

Instance Method Details

#to_hashObject



19
20
21
# File 'lib/capital-iq/request.rb', line 19

def to_hash
  @hash
end