Class: Roglew::Contextual

Inherits:
Module
  • Object
show all
Defined in:
lib/roglew/contextual.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_classObject (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