Class: Seam::DeepHashAccessor
- Inherits:
-
Object
- Object
- Seam::DeepHashAccessor
- Defined in:
- lib/seam/deep_hash_accessor.rb
Instance Method Summary collapse
- #[](key) ⇒ Object
-
#initialize(data) ⇒ DeepHashAccessor
constructor
A new instance of DeepHashAccessor.
Constructor Details
#initialize(data) ⇒ DeepHashAccessor
Returns a new instance of DeepHashAccessor.
7 8 9 10 |
# File 'lib/seam/deep_hash_accessor.rb', line 7 def initialize(data) @data = data create_accessor_methods end |
Instance Method Details
#[](key) ⇒ Object
12 13 14 |
# File 'lib/seam/deep_hash_accessor.rb', line 12 def [](key) instance_variable_get(:"@#{key}") end |