Class: ActiveSupport::HashWithIndifferentAccess
- Defined in:
- lib/app_yml/core_ext.rb,
lib/generators/app_yml/install/templates/app.rb
Instance Method Summary collapse
-
#method_missing(method, *args) ⇒ Object
Public: Causes ‘}.arg’ to call ‘{’.
Methods inherited from Hash
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args) ⇒ Object
Public: Causes ‘}.arg’ to call ‘{’.
Note: None of the HashWithIndifferentAccess methods will work here. (as.rubyonrails.org/classes/HashWithIndifferentAccess.html)
The aforementioned methods will invoke their expected functionality.
Examples
(HashWithIndifferentAccess.new({ :country => 'Canada' })).country
=> 'Canada'
Returns the calling hash with the updated values.
41 42 43 |
# File 'lib/app_yml/core_ext.rb', line 41 def method_missing(method, *args) self[method] end |