Class: Eodhd::Exchange

Inherits:
Object
  • Object
show all
Defined in:
lib/Eodhd/Exchange.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, code:, operating_mic:, country:, currency:, country_iso2:, country_iso3:) ⇒ Exchange

Returns a new instance of Exchange.



38
39
40
41
42
43
44
45
46
# File 'lib/Eodhd/Exchange.rb', line 38

def initialize(name:, code:, operating_mic:, country:, currency:, country_iso2:, country_iso3:)
  @name = name
  @code = code
  @operating_mic = operating_mic
  @country = country
  @currency = currency
  @country_iso2 = country_iso2
  @country_iso3 = country_iso3
end

Instance Attribute Details

#codeObject (readonly)

class << self



29
30
31
# File 'lib/Eodhd/Exchange.rb', line 29

def code
  @code
end

#countryObject (readonly)

class << self



29
30
31
# File 'lib/Eodhd/Exchange.rb', line 29

def country
  @country
end

#country_iso2Object (readonly)

class << self



29
30
31
# File 'lib/Eodhd/Exchange.rb', line 29

def country_iso2
  @country_iso2
end

#country_iso3Object (readonly)

class << self



29
30
31
# File 'lib/Eodhd/Exchange.rb', line 29

def country_iso3
  @country_iso3
end

#currencyObject (readonly)

class << self



29
30
31
# File 'lib/Eodhd/Exchange.rb', line 29

def currency
  @currency
end

#nameObject (readonly)

class << self



29
30
31
# File 'lib/Eodhd/Exchange.rb', line 29

def name
  @name
end

#operating_micObject (readonly)

class << self



29
30
31
# File 'lib/Eodhd/Exchange.rb', line 29

def operating_mic
  @operating_mic
end

Class Method Details

.all(client: nil, api_token: nil) ⇒ Object



7
8
9
# File 'lib/Eodhd/Exchange.rb', line 7

def all(client: nil, api_token: nil)
  load(client: client, api_token: api_token)
end