Class: Finnhub::Crypto_Exchange
- Inherits:
-
Object
- Object
- Finnhub::Crypto_Exchange
- Defined in:
- lib/Crypto.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(client:, name:) ⇒ Crypto_Exchange
constructor
A new instance of Crypto_Exchange.
- #symbol(**args) ⇒ Object
- #symbols(plain: false) ⇒ Object
Constructor Details
#initialize(client:, name:) ⇒ Crypto_Exchange
Returns a new instance of Crypto_Exchange.
3 4 5 6 |
# File 'lib/Crypto.rb', line 3 def initialize(client:, name:) @client = client @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
8 9 10 |
# File 'lib/Crypto.rb', line 8 def name @name end |
Instance Method Details
#symbol(**args) ⇒ Object
19 20 21 |
# File 'lib/Crypto.rb', line 19 def symbol(**args) Finnhub::Crypto_Symbol.new(client: @client, exchange: @name, **args) end |
#symbols(plain: false) ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/Crypto.rb', line 10 def symbols(plain: false) output = @client.request("/crypto/symbol?exchange=#{@name}") return output if plain output.map do |o| Finnhub::Crypto_Symbol.new(client: @client, exchange: @name, **o) end end |