Class: ClassyStruct::ClassyStructClass
- Inherits:
-
Object
- Object
- ClassyStruct::ClassyStructClass
- Includes:
- CommonStruct
- Defined in:
- ext/classystruct.rb
Constant Summary
Constants included from CommonStruct
CommonStruct::DEFAULT_STRUCT_TYPE
Instance Method Summary collapse
-
#lock ⇒ Object
Convert ClassyStruct to Struct, thus locking it.
- #merge(other) ⇒ Object
- #struct_type ⇒ Object
Methods included from CommonStruct
Instance Method Details
#lock ⇒ Object
Convert ClassyStruct to Struct, thus locking it.
41 42 43 |
# File 'ext/classystruct.rb', line 41 def lock self.to_h.to_struct(Struct::STRUCT_TYPE) end |
#merge(other) ⇒ Object
36 37 38 |
# File 'ext/classystruct.rb', line 36 def merge other self.to_h.merge!(other.to_h).to_struct(STRUCT_TYPE) end |
#struct_type ⇒ Object
32 33 34 |
# File 'ext/classystruct.rb', line 32 def struct_type STRUCT_TYPE end |