Class: Alphavantage::NormalizeKey
- Inherits:
-
Object
- Object
- Alphavantage::NormalizeKey
- Defined in:
- lib/alphavantage/normalize_key.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(key:) ⇒ NormalizeKey
constructor
A new instance of NormalizeKey.
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
#call ⇒ Object
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 |