Displaying 2 results from an estimated 2 matches for "remove_possible_method".
2012 Sep 11
1
define_method vs module_eval
...rs.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.join("\n")}
end
METHOD
end
Here we invoke send() on the module Accessors, passing
the :define_method symbol, which represents the define_method private
method available from Class class. We create an instanc...
2012 Sep 22
4
Class, Module, Object
>> reload!
Reloading...
=> true
>> puts Class < Module
true
=> nil
>> puts Module < Class
false
=> nil
>> puts Module < Object
true
=> nil
>> puts Object < Module
false
=> nil
>> Object.parent
=> Object
The above indicates that the Class object instance inherits from the
Module object instance and the Module object instance