Module: Amoeba::InstanceMethods
- Defined in:
- lib/amoeba/instance_methods.rb
Instance Method Summary collapse
- #_amoeba_settings ⇒ Object
- #_first_superclass_with_amoeba ⇒ Object
- #_parent_amoeba ⇒ Object
- #_parent_amoeba_settings ⇒ Object
- #amoeba_dup(options = {}) ⇒ Object
Instance Method Details
#_amoeba_settings ⇒ Object
24 25 26 |
# File 'lib/amoeba/instance_methods.rb', line 24 def _amoeba_settings self.class.amoeba_block end |
#_first_superclass_with_amoeba ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/amoeba/instance_methods.rb', line 13 def _first_superclass_with_amoeba return @_first_superclass_with_amoeba unless @_first_superclass_with_amoeba.nil? klass = self.class while klass.superclass < ::ActiveRecord::Base klass = klass.superclass break if klass.respond_to?(:amoeba) && klass.amoeba.enabled end @_first_superclass_with_amoeba = klass end |
#_parent_amoeba ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/amoeba/instance_methods.rb', line 5 def _parent_amoeba if _first_superclass_with_amoeba.respond_to?(:amoeba) _first_superclass_with_amoeba.amoeba else false end end |
#_parent_amoeba_settings ⇒ Object
28 29 30 31 32 33 34 |
# File 'lib/amoeba/instance_methods.rb', line 28 def _parent_amoeba_settings if _first_superclass_with_amoeba.respond_to?(:amoeba_block) _first_superclass_with_amoeba.amoeba_block else false end end |