Module: Ghaki::App::Mixin
- Defined in:
- lib/ghaki/app/mixin.rb
Overview
Default engine mixin name.
Example
require 'ghaki/app/mixin'
class MyWidget
include Ghaki::App::Mixin
def do_something
app.logger.info 'did something'
end
end
class OtherWidget
extend Ghaki::App::Mixin
def self.do_something
app.logger.info 'did something else'
end
end
Class Method Summary collapse
-
.extended(klass) ⇒ Object
:nodoc:.
-
.included(klass) ⇒ Object
:nodoc:.
Class Method Details
.extended(klass) ⇒ Object
:nodoc:
37 38 39 40 41 42 |
# File 'lib/ghaki/app/mixin.rb', line 37 def self.extended klass #:nodoc: klass.class_exec do include Ghaki::App::Mixer app_engine_eigen_mixin :app end end |
.included(klass) ⇒ Object
:nodoc:
30 31 32 33 34 35 |
# File 'lib/ghaki/app/mixin.rb', line 30 def self.included klass #:nodoc: klass.class_exec do include Ghaki::App::Mixer app_engine_class_mixin :app end end |