Class: BinData::Struct::Snapshot

Inherits:
Hash
  • Object
show all
Defined in:
lib/bindata/struct.rb

Overview

A hash that can be accessed via attributes.

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(symbol, *args) ⇒ Object



65
66
67
# File 'lib/bindata/struct.rb', line 65

def method_missing(symbol, *args)
  self[symbol.to_s] || super
end

Instance Method Details

#respond_to?(symbol, include_private = false) ⇒ Boolean

:nodoc:

Returns:

  • (Boolean)


61
62
63
# File 'lib/bindata/struct.rb', line 61

def respond_to?(symbol, include_private = false)
  has_key?(symbol.to_s) || super(symbol, include_private)
end