You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Called for dynamically-defined keys, and also the first key deferenced at the top-level, if load! is not used.
# Called for dynamically-defined keys, and also the first key deferenced at the top-level, if load! is not used.# Otherwise, create_accessors! (called by new) will have created actual methods for each key.defmethod_missing(name, *args, &block)key=name.to_sreturnmissing_key("Missing setting '#{key}' in #{@section}")unlesshas_key?keyvalue=fetch(key)create_accessor_for(key)value.is_a?(Hash) ? self.class.new(value,"'#{key}' section in #{@section}") : valueend
I notice the code after the return is not covered in tests and I wasn't able to hit it on my own. Anyway I tried, private method instance is called in the Settingslogic class, which creates accessors for fields that do exist, for keys that don't exist the method returns.
The text was updated successfully, but these errors were encountered:
settingslogic/lib/settingslogic.rb
Line 113 in c510aff
I notice the code after the
return
is not covered in tests and I wasn't able to hit it on my own. Anyway I tried, private methodinstance
is called in theSettingslogic
class, which creates accessors for fields that do exist, for keys that don't exist the method returns.The text was updated successfully, but these errors were encountered: