Class: Alphavantage::NormalizeKey

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

Instance Method Summary collapse

Constructor Details

#initialize(key:) ⇒ NormalizeKey

Returns a new instance of NormalizeKey.



3
4
5
# File 'lib/alphavantage/normalize_key.rb', line 3

def initialize(key:)
  @key = key
end

Instance Method Details

#callObject



7
8
9
10
# File 'lib/alphavantage/normalize_key.rb', line 7

def call
  return @key if is_date?(@key)
  underscore_key(sanitize_key(@key))
end