Class: DrupalFu::DrupalObject
- Inherits:
-
Object
- Object
- DrupalFu::DrupalObject
- Defined in:
- lib/drupal_fu/drupal_object.rb
Instance Method Summary collapse
-
#initialize(hash) ⇒ DrupalObject
constructor
A new instance of DrupalObject.
- #method_missing(method, *args, &block) ⇒ Object
Constructor Details
#initialize(hash) ⇒ DrupalObject
Returns a new instance of DrupalObject.
3 4 5 |
# File 'lib/drupal_fu/drupal_object.rb', line 3 def initialize(hash) @hash = hash end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/drupal_fu/drupal_object.rb', line 7 def method_missing(method, *args, &block) if @hash.has_key?(method.to_s) return @hash[method.to_s] end super end |