Class: Finnhub::Merge_Country

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client:, country:) ⇒ Merge_Country

Returns a new instance of Merge_Country.



3
4
5
6
# File 'lib/Country.rb', line 3

def initialize(client:, country:)
  @client = client
  @country = country
end

Instance Attribute Details

#countryObject (readonly)

Returns the value of attribute country.



8
9
10
# File 'lib/Country.rb', line 8

def country
  @country
end

Instance Method Details

#merger(from: nil, to: nil) ⇒ Object



10
11
12
13
14
15
# File 'lib/Country.rb', line 10

def merger(from: nil, to: nil)
  url = "/merger?country=#{@country}"
  url += "&from=#{from}" unless from.nil?
  url += "&to=#{to}" unless to.nil?
  @client.request(url)
end