Module: DeepStruct

Defined in:
lib/deepstruct.rb

Defined Under Namespace

Classes: ArrayWrapper, DeepWrapper, HashWrapper

Class Method Summary collapse

Class Method Details

.wrap(value) ⇒ Object



97
98
99
100
101
102
103
104
105
106
# File 'lib/deepstruct.rb', line 97

def self.wrap(value)
  case value
  when Hash
    HashWrapper.new(value)
  when Array, Set
    ArrayWrapper.new(value)
  else
    value
  end
end