class Configature::Data

Public Class Methods

hashify(data) click to toggle source

Class Methods ========================================================

# File lib/configature/data.rb, line 6
def self.hashify(data)
  case (data)
  when Configature::Data
    data.to_h
  when Array
    data.map do |v|
      hashify(v)
    end
  else
    data
  end
end

Public Instance Methods

to_h() click to toggle source

Instance Methods =====================================================

Calls superclass method
# File lib/configature/data.rb, line 21
def to_h
  super.map do |k, v|
    [ k, self.class.hashify(v) ]
  end.to_h
end