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
339 340 341 |
# File 'lib/bindata/struct.rb', line 339 def method_missing(symbol, *args) self[symbol] || super end |
Instance Method Details
#[]=(key, value) ⇒ Object
:nodoc:
331 332 333 |
# File 'lib/bindata/struct.rb', line 331 def []=(key, value) super(key, value) unless value.nil? end |
#respond_to?(symbol, include_private = false) ⇒ Boolean
335 336 337 |
# File 'lib/bindata/struct.rb', line 335 def respond_to?(symbol, include_private = false) has_key?(symbol) || super end |