Displaying 1 result from an estimated 1 matches for "iskimrw02ac5ovgd8gxyqq".
2012 Sep 11
1
define_method vs module_eval
Rails code:
Accessors.send :define_method, :"default_#{name}", &block
Accessors.module_eval <<-METHOD, __FILE__, __LINE__ + 1
def #{name}
-ISKimRw02aC5oVgD8gxYQQ@public.gmane.org(:#{name}, [])
end
def #{name}=(value)
value = value.present? ? Array(value) : default_#{name}
_set_detail(:#{name}, value) if value != @details[:#{name}]
end
remove_possible_method :initialize_details
def initialize_details(details)
#{initialize.jo...