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_missing?(symbol, include_all = false) ⇒ Boolean
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(symbol, *args) ⇒ Object
295 296 297 |
# File 'lib/bindata/struct.rb', line 295 def method_missing(symbol, *args) key?(symbol) ? self[symbol] : super end |
Instance Method Details
#[]=(key, value) ⇒ Object
:nodoc:
287 288 289 |
# File 'lib/bindata/struct.rb', line 287 def []=(key, value) super unless value.nil? end |
#respond_to_missing?(symbol, include_all = false) ⇒ Boolean
291 292 293 |
# File 'lib/bindata/struct.rb', line 291 def respond_to_missing?(symbol, include_all = false) key?(symbol) || super end |