lib/gorillib/model/base.rb
#
# A readable handle for this field
#
A readable handle for this field
A readable handle for this field
def define_attribute_receiver(field_name, field_type, visibility)
        define_meta_module_method("receive_#{field_name}", visibility) do |val|
          begin
            val = field_type.receive(val)
            write_attribute(field_name, val)
          rescue StandardError => err ; err.polish("#{self.class}.#{field_name} type #{type} on #{val}") rescue nil ; raise ; end
        end
      end
def define_attribute_receiver ( field_name , field_type , visibility ) define_meta_module_method ( "receive_#{field_name}" , visibility ) do | val | begin val = field_type . receive ( val ) write_attribute ( field_name , val ) rescue StandardError => err ; err . polish ( "#{self.class}.#{field_name} type #{type} on #{val}" ) rescue nil ; raise ; end end end
A readable handle for this field
A readable handle for this field
# @param  [Object] val the raw value to type-convert and adopt # @return [Object] the attribute's new value
field_name
<not_specific>
field_type
<not_specific>
visibility
<not_specific>