module Hashie::Extensions::Dash::IndifferentAccess::ClassMethods
Public Instance Methods
property?(name)
click to toggle source
Check to see if the specified property has already been defined.
# File lib/hashie/extensions/dash/indifferent_access.rb, line 13 def property?(name) name = translations[name.to_sym] if included_modules.include?(Hashie::Extensions::Dash::PropertyTranslation) && translation_exists?(name) name = name.to_s !!properties.find { |property| property.to_s == name } end
transformation_exists?(name)
click to toggle source
# File lib/hashie/extensions/dash/indifferent_access.rb, line 29 def transformation_exists?(name) name = name.to_s !!transforms.keys.find { |key| key.to_s == name } end
transformed_property(property_name, value)
click to toggle source
# File lib/hashie/extensions/dash/indifferent_access.rb, line 24 def transformed_property(property_name, value) transform = transforms[property_name] || transforms[property_name.to_sym] transform.call(value) end
translation_exists?(name)
click to toggle source
# File lib/hashie/extensions/dash/indifferent_access.rb, line 19 def translation_exists?(name) name = name.to_s !!translations.keys.find { |key| key.to_s == name } end