Class: Fetching::FetchingHash
- Defined in:
- lib/fetching/fetching_hash.rb
Constant Summary
Constants inherited from Fetching
Instance Method Summary collapse
-
#initialize(*args) ⇒ FetchingHash
constructor
A new instance of FetchingHash.
- #to_hash ⇒ Object
Methods inherited from Fetching
#==, from, from_json, #hash, #inspect, #to_fetching, #to_s
Constructor Details
#initialize(*args) ⇒ FetchingHash
Returns a new instance of FetchingHash.
4 5 6 7 |
# File 'lib/fetching/fetching_hash.rb', line 4 def initialize(*args) super make_methods end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(key, *_args, &_block) ⇒ Object (private)
23 24 25 |
# File 'lib/fetching/fetching_hash.rb', line 23 def method_missing(key, *_args, &_block) raise NoMethodError, "#{key} not found\nyou have:\n#{@table.keys.join(', ')}" end |
Instance Method Details
#to_hash ⇒ Object
9 10 11 |
# File 'lib/fetching/fetching_hash.rb', line 9 def to_hash @table.dup end |