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

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

Instance Method Summary collapse

Instance Method Details

#context_cardObject



21
22
23
# File 'tmpsets/set/mod003-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 'tmpsets/set/mod003-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) ⇒ Object



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

def with_context context_card
  card.with_context context_card do
    yield
  end
end