Module: Card::Set::Self::Head::HtmlFormat

Extended by:
AbstractFormat
Defined in:
platypus/tmp/set/gem-defaults/mod031-layout/self/head.rb

Instance Method Summary collapse

Instance Method Details

#escape_in_mainObject



33
34
35
# File 'platypus/tmp/set/gem-defaults/mod031-layout/self/head.rb', line 33

def escape_in_main
  main? ? (h yield) : yield
end

#view: bar_bottomObject



30
31
# File 'platypus/tmp/set/gem-defaults/mod031-layout/self/head.rb', line 30

view :bar_bottom do
end

#view: coreObject

when *head is rendered in the main body of a page, we escape the HTML otherwise (most typically in the head tag, of course), we render the HTML unescaped



16
17
18
19
20
21
22
23
24
# File 'platypus/tmp/set/gem-defaults/mod031-layout/self/head.rb', line 16

view :core, cache: :never do
  escape_in_main do
    nest root.card, view: :head
    # NOTE: that the head tag for each card is different
    # (different title, different style rules, etc)
    # so we don't cache the core of *head, but we _do_ cache some
    # views within each head (see all/head.rb)
  end
end

#view: inputObject



26
27
28
# File 'platypus/tmp/set/gem-defaults/mod031-layout/self/head.rb', line 26

view :input do
  "Content can't be edited."
end