Class: Awestruct::AStruct
- Inherits:
-
Hash
- Object
- Hash
- Awestruct::AStruct
- Includes:
- AStructMixin
- Defined in:
- lib/awestruct/astruct.rb
Constant Summary
Constants included from AStructMixin
Awestruct::AStructMixin::UNTRACKED_KEYS
Instance Method Summary collapse
- #hash ⇒ Object
-
#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.
13 14 15 |
# File 'lib/awestruct/astruct.rb', line 13 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
#hash ⇒ Object
24 25 26 |
# File 'lib/awestruct/astruct.rb', line 24 def hash() self.output_path.hash end |
#inspect ⇒ Object
20 21 22 |
# File 'lib/awestruct/astruct.rb', line 20 def inspect "AStruct{...}" end |