Module: Card::Set::All::ContextualContent::Format

Extended by:
Card::Set::AbstractFormat
Defined in:
card/tmpsets/set/mod002-core/all/contextual_content.rb

Instance Method Summary collapse

Instance Method Details

#context_cardObject



21
22
23
# File 'card/tmpsets/set/mod002-core/all/contextual_content.rb', line 21

def context_card
  card.context_card
end

#contextual_content(context_card, options = {}) ⇒ Object



31
32
33
34
# File 'card/tmpsets/set/mod002-core/all/contextual_content.rb', line 31

def contextual_content context_card, options={}
  view = options.delete(:view) || :core
  with_context(context_card) { render! view, options }
end

#with_context(context_card, &block) ⇒ Object



25
26
27
28
29
# File 'card/tmpsets/set/mod002-core/all/contextual_content.rb', line 25

def with_context context_card
  card.with_context context_card do
    yield
  end
end