class ConfigType::Json

Public Class Methods

extensions() click to toggle source
# File lib/config_file/config_type.rb, line 38
def self.extensions
  [".json"]
end

Public Instance Methods

read(file_name) click to toggle source
# File lib/config_file/config_type.rb, line 42
def read file_name
  interpolator = TextInterpolator.new

  content = File.read(file_name)

  hash = ::JSON.parse(content, :symbolize_names => true)

  interpolator.interpolate hash
end