Module: E9Rails::ActiveRecord::InheritableOptions::ClassMethods
- Defined in:
- lib/e9_rails/active_record/inheritable_options.rb
Instance Method Summary collapse
- #define_method_attribute_with_inheritable_options(attr_name) ⇒ Object
- #inheritable_options_initialized? ⇒ Boolean
- #initialize_inheritable_options ⇒ Object
Instance Method Details
#define_method_attribute_with_inheritable_options(attr_name) ⇒ Object
64 65 66 |
# File 'lib/e9_rails/active_record/inheritable_options.rb', line 64 def (attr_name) end |
#inheritable_options_initialized? ⇒ Boolean
68 69 70 |
# File 'lib/e9_rails/active_record/inheritable_options.rb', line 68 def !!@inheritable_options_initialized end |
#initialize_inheritable_options ⇒ Object
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/e9_rails/active_record/inheritable_options.rb', line 72 def return if self. ||= self..present? ? Options : IndifferentOptions self..lookup_ancestors = lookup_ancestors if self. serialized_attributes[self..to_s] = Hash end if self. self..each do |param| delegate param, "#{param}=", :to => :options end end @inheritable_options_initialized = true end |