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, **kwargs) ⇒ 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, **kwargs) ⇒ Object
296 297 298 |
# File 'lib/bindata/struct.rb', line 296 def method_missing(symbol, *args, **kwargs) key?(symbol) ? self[symbol] : super end |
Instance Method Details
#[]=(key, value) ⇒ Object
:nodoc:
288 289 290 |
# File 'lib/bindata/struct.rb', line 288 def []=(key, value) super unless value.nil? end |
#respond_to_missing?(symbol, include_all = false) ⇒ Boolean
292 293 294 |
# File 'lib/bindata/struct.rb', line 292 def respond_to_missing?(symbol, include_all = false) key?(symbol) || super end |