Module: Exposant::Contextualizable

Included in:
Base
Defined in:
lib/exposant/concerns/contextualizable.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#contextObject

Returns the value of attribute context.



3
4
5
# File 'lib/exposant/concerns/contextualizable.rb', line 3

def context
  @context
end

Instance Method Details

#contextualize(context) ⇒ Object



5
6
7
# File 'lib/exposant/concerns/contextualizable.rb', line 5

def contextualize(context)
  self.context = context
end

#contextualized?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/exposant/concerns/contextualizable.rb', line 9

def contextualized?
  context.present?
end