Class: BinData::Struct::Snapshot
- Inherits:
-
Hash
- Object
- Hash
- BinData::Struct::Snapshot
- Defined in:
- lib/bindata/struct.rb
Overview
A hash that can be accessed via attributes.
Instance Method Summary collapse
-
#[]=(key, value) ⇒ Object
:nodoc:.
- #method_missing(symbol, *args) ⇒ Object
- #respond_to?(symbol, include_private = false) ⇒ Boolean
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(symbol, *args) ⇒ Object
279 280 281 |
# File 'lib/bindata/struct.rb', line 279 def method_missing(symbol, *args) self[symbol] || super end |
Instance Method Details
#[]=(key, value) ⇒ Object
:nodoc:
271 272 273 |
# File 'lib/bindata/struct.rb', line 271 def []=(key, value) super unless value.nil? end |
#respond_to?(symbol, include_private = false) ⇒ Boolean
275 276 277 |
# File 'lib/bindata/struct.rb', line 275 def respond_to?(symbol, include_private = false) has_key?(symbol) || super end |