class PUNK::Settings
Public Instance Methods
method_missing(key, *args, &block)
click to toggle source
Calls superclass method
# File lib/punk/core/settings.rb, line 11 def method_missing(key, *args, &block) match = /^(.*)([!?])$/.match(key) if match && key?(match[1]) && !key?(key) value = execute(match[1], *args, &block) case match[2] when "?" return value if value.is_a?(TrueClass) || value.is_a?(FalseClass) when "!" raise InternalServerError, "Value is nil: #{key}" if value.nil? return value end end super end
respond_to_missing?(key, *args)
click to toggle source
Calls superclass method
# File lib/punk/core/settings.rb, line 26 def respond_to_missing?(key, *args) match = /^(.*)([!?])$/.match(key) key = match[1] if match && !key?(key) super end
Private Instance Methods
_inspect_hash()
click to toggle source
# File lib/punk/core/settings.rb, line 34 def _inspect_hash to_h.inspect end