class Finnhub::Economic_Code

Attributes

code[R]
hash[R]

Public Class Methods

new(client:, code:, hash:) click to toggle source
# File lib/Economic.rb, line 3
def initialize(client:, code:, hash:)
  @client = client
  @code = code
  @hash = hash
end

Public Instance Methods

data(plain: false) click to toggle source
# File lib/Economic.rb, line 11
def data(plain: false)
  output = @client.request("/economic?code=#{@code}")
  return output if plain

  output.map{|o| [Time.parse(o[0]), o[1]]}
end