Module: Easyhooks
- Defined in:
- lib/easyhooks.rb,
lib/easyhooks/base.rb,
lib/easyhooks/hook.rb,
lib/easyhooks/store.rb,
lib/easyhooks/action.rb,
lib/easyhooks/trigger.rb,
lib/easyhooks/version.rb,
lib/easyhooks/migration.rb,
lib/easyhooks/store_values.rb,
lib/easyhooks/specification.rb,
lib/easyhooks/post_processor.rb,
lib/easyhooks/concerns/helpers.rb,
lib/easyhooks/concerns/validators.rb,
lib/generators/easyhooks/migration/migration_generator.rb
Defined Under Namespace
Modules: ClassMethods, Helpers, InstanceMethods, Validators Classes: Action, Base, Hook, Migration, MigrationGenerator, PostProcessor, Specification, Store, StoreValues, Trigger
Constant Summary collapse
- VERSION =
'1.0.3'
Class Method Summary collapse
Class Method Details
.included(klass) ⇒ Object
97 98 99 100 101 102 103 104 105 106 |
# File 'lib/easyhooks.rb', line 97 def self.included(klass) # check if the klass extends from ActiveRecord::Base, if not raise an error unless klass.ancestors.include?(ActiveRecord::Base) raise "Easyhooks can only be included in classes that extend from ActiveRecord::Base" end klass.send :include, InstanceMethods klass.extend ClassMethods end |