Module: AMC::Acts::Importable::ClassMethods
- Defined in:
- lib/acts_as_importable.rb
Instance Method Summary collapse
Instance Method Details
#acts_as_importable(options = {}) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/acts_as_importable.rb', line 11 def acts_as_importable( = {}) # Store the import target class with the legacy class write_inheritable_attribute :importable_to, [:to] # Don't extend or include twice. This will allow acts_as_importable to be called multiple times. # eg. once in a parent class and once again in the child class, where it can override some options. extend AMC::Acts::Importable::SingletonMethods unless self.methods.include?('import') && self.methods.include?('import_all') include AMC::Acts::Importable::InstanceMethods unless self.included_modules.include?(AMC::Acts::Importable::InstanceMethods) end |