module Hashie::Extensions::Dash::PropertyTranslation::ClassMethods
def property(property_name, options = {})
* :transform_with - Specify a lambda to be used to convert value
* :with - Specify a lambda to be used to convert value.
* :from - Specify the original key name that will be write only.
returned before a value is set on the property in a new Dash.
* :default - Specify a default value for this property, to be
Defines a property on the Trash. Options are as follows:
def property(property_name, options = {}) super from = options[:from] converter = options[:with] transformer = options[:transform_with] if from fail_self_transformation_error!(property_name) if property_name == from define_translation(from, property_name, converter || transformer) define_writer_for_source_property(from) elsif valid_transformer?(transformer) transforms[property_name] = transformer end end