Module: Refinery::Engine::ClassMethods
- Defined in:
- core/lib/refinery/engine.rb
Instance Method Summary (collapse)
-
- (Object) after_inclusion(&block)
Specify a block of code to be run after the refinery inclusion step.
-
- (Object) after_inclusion_procs
:nodoc:.
-
- (Object) before_inclusion(&block)
Specify a block of code to be run before the refinery inclusion step.
-
- (Object) before_inclusion_procs
:nodoc:.
Instance Method Details
- (Object) after_inclusion(&block)
Specify a block of code to be run after the refinery inclusion step. See Refinery::Core::Engine#refinery_inclusion for details regarding the Refinery inclusion process.
Example:
module Refinery
module Images
class Engine < Rails::Engine
engine_name :images
after_inclusion do
# perform something here
end
end
end
end
28 29 30 31 32 33 34 |
# File 'core/lib/refinery/engine.rb', line 28 def after_inclusion(&block) if block && block.respond_to?(:call) after_inclusion_procs << block else raise 'Anything added to be called after_inclusion must be callable (respond to #call).' end end |
- (Object) after_inclusion_procs
:nodoc:
8 9 10 |
# File 'core/lib/refinery/engine.rb', line 8 def after_inclusion_procs #:nodoc: @@after_inclusion_procs ||= [] end |
- (Object) before_inclusion(&block)
Specify a block of code to be run before the refinery inclusion step. See Refinery::Core::Engine#refinery_inclusion for details regarding the Refinery inclusion process.
Example:
module Refinery
module Images
class Engine < Rails::Engine
engine_name :images
before_inclusion do
# perform something here
end
end
end
end
56 57 58 59 60 61 62 |
# File 'core/lib/refinery/engine.rb', line 56 def before_inclusion(&block) if block && block.respond_to?(:call) before_inclusion_procs << block else raise 'Anything added to be called before_inclusion must be callable (respond to #call).' end end |
- (Object) before_inclusion_procs
:nodoc:
36 37 38 |
# File 'core/lib/refinery/engine.rb', line 36 def before_inclusion_procs #:nodoc: @@before_inclusion_procs ||= [] end |