class OpenStruct
Constants
- STRUCT_TYPE
Public Instance Methods
lock()
click to toggle source
Convert OpenStruct
to Struct
, thus locking it.
# File ext/openstruct.rb, line 42 def lock self.to_h.to_struct(Struct::STRUCT_TYPE) end
merge(other)
click to toggle source
returns new object
# File ext/openstruct.rb, line 37 def merge other OpenStruct.new(self.to_h.merge(other.to_h)) end
merge!(other)
click to toggle source
replaces object
# File ext/openstruct.rb, line 32 def merge! other self.marshal_load(merge(other).to_h) end
struct_type()
click to toggle source
# File ext/openstruct.rb, line 27 def struct_type STRUCT_TYPE end
unlock()
click to toggle source
# File ext/openstruct.rb, line 46 def unlock self # noop end