Class: Tenderloin::Config::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/tenderloin/config.rb

Instance Method Summary collapse

Instance Method Details

#[](key) ⇒ Object



40
41
42
# File 'lib/tenderloin/config.rb', line 40

def [](key)
  send(key)
end

#instance_variables_hashObject



48
49
50
51
52
53
# File 'lib/tenderloin/config.rb', line 48

def instance_variables_hash
  instance_variables.inject({}) do |acc, iv|
    acc[iv.to_s[1..-1].to_sym] = instance_variable_get(iv)
    acc
  end
end

#to_jsonObject



44
45
46
# File 'lib/tenderloin/config.rb', line 44

def to_json
  instance_variables_hash.to_json
end