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
280 281 282 |
# File 'lib/bindata/struct.rb', line 280 def method_missing(symbol, *args) key?(symbol) ? self[symbol] : super end |
Instance Method Details
#[]=(key, value) ⇒ Object
:nodoc:
272 273 274 |
# File 'lib/bindata/struct.rb', line 272 def []=(key, value) super unless value.nil? end |
#respond_to?(symbol, include_private = false) ⇒ Boolean
276 277 278 |
# File 'lib/bindata/struct.rb', line 276 def respond_to?(symbol, include_private = false) key?(symbol) || super end |