Class: Awestruct::AStruct
- Inherits:
-
Hash
- Object
- Hash
- Awestruct::AStruct
- Includes:
- AStructMixin
- Defined in:
- lib/awestruct/astruct.rb
Instance Method Summary collapse
-
#initialize(hash = nil) ⇒ AStruct
constructor
A new instance of AStruct.
- #inspect ⇒ Object
Methods included from AStructMixin
#[], #cascade_for_nils!, extended, #key?, #method_missing, #transform_entry
Constructor Details
#initialize(hash = nil) ⇒ AStruct
Returns a new instance of AStruct.
9 10 11 |
# File 'lib/awestruct/astruct.rb', line 9 def initialize(hash=nil) hash.each{|k,v| self[k]=v } if hash end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Awestruct::AStructMixin
Instance Method Details
#inspect ⇒ Object
16 17 18 |
# File 'lib/awestruct/astruct.rb', line 16 def inspect "AStruct{...}" end |