Class: Roglew::Contextual
- Inherits:
-
Module
- Object
- Module
- Roglew::Contextual
- Defined in:
- lib/roglew/contextual.rb
Instance Attribute Summary collapse
-
#context_class ⇒ Object
readonly
Returns the value of attribute context_class.
Instance Method Summary collapse
- #included(c) ⇒ Object
-
#initialize(context_class) ⇒ Contextual
constructor
A new instance of Contextual.
Constructor Details
#initialize(context_class) ⇒ Contextual
Returns a new instance of Contextual.
41 42 43 |
# File 'lib/roglew/contextual.rb', line 41 def initialize(context_class) @context_class = context_class end |
Instance Attribute Details
#context_class ⇒ Object (readonly)
Returns the value of attribute context_class.
39 40 41 |
# File 'lib/roglew/contextual.rb', line 39 def context_class @context_class end |
Instance Method Details
#included(c) ⇒ Object
45 46 47 48 49 50 51 |
# File 'lib/roglew/contextual.rb', line 45 def included(c) super c.instance_eval do include ContextualModule extend ContextualModule::ClassMethods end end |