lib/codestrap/object/factory.rb
def objects
        objects = {}
        scan.each_pair do |key, value|
          case value
            when Hash
              objects[key] = OpenStruct.new(value)
            else
              objects[key] = value
          end
        end
        objects
      end
# Generate a hash of key, value pair
# If value is of type Hash it is converted into an [OpenStruct] object
#
# @return [Hash]
Generate a hash of key, value pair
If value is of type Hash it is converted into an [OpenStruct] object
Generate a hash of key value pair If value is of type Hash it is converted into an [ OpenStruct ] object
def objects
        objects = {}
        scan.each_pair do |key, value|
          case value
            when Hash
              objects[key] = OpenStruct.new(value)
            else
              objects[key] = value
          end
        end
        objects
      end
def objects objects = { } scan . each_pair do | key , value | case value when Hash objects [ key ] = OpenStruct . new ( value ) else objects [ key ] = value end end objects end
Generate a hash of key, value pair
If value is of type Hash it is converted into an [OpenStruct] object
Generate a hash of key value pair If value is of type Hash it is converted into an [ OpenStruct ] object
None
Hash