Module: Card::Set::All::Css::CssFormat

Extended by:
Card::Set::AbstractFormat
Defined in:
card/tmpsets/set/mod008-card-mod-format/all/css.rb,
card/tmpsets/set/mod007-card-mod-format/all/css.rb

Instance Method Summary collapse

Instance Method Details

#default_nest_viewObject



10
11
12
# File 'card/tmpsets/set/mod008-card-mod-format/all/css.rb', line 10

def default_nest_view
  :raw
end

#major_comment(comment, char = "-") ⇒ Object



39
40
41
42
43
# File 'card/tmpsets/set/mod008-card-mod-format/all/css.rb', line 39

def major_comment comment, char="-"
  edge = %(/* #{char * (comment.length + 4)} */)
  main = %(/* #{char} #{comment} #{char} */)
  "#{edge}\n#{main}\n#{edge}\n\n"
end

#show(view, args) ⇒ Object



14
15
16
17
# File 'card/tmpsets/set/mod008-card-mod-format/all/css.rb', line 14

def show view, args
  view ||= :content
  render! view, args
end

#view: contentObject



23
24
25
# File 'card/tmpsets/set/mod008-card-mod-format/all/css.rb', line 23

view :content do
  _render_core
end

#view: importObject



31
32
33
# File 'card/tmpsets/set/mod008-card-mod-format/all/css.rb', line 31

view :import do
  _render_core
end

#view: titledObject



19
20
21
# File 'card/tmpsets/set/mod008-card-mod-format/all/css.rb', line 19

view :titled do
  major_comment(%( Style Card: \\"#{card.name}\\" )) + _render_core
end

#view: unknownObject



27
28
29
# File 'card/tmpsets/set/mod008-card-mod-format/all/css.rb', line 27

view :unknown do
  major_comment "MISSING Style Card: #{card.name}"
end

#view: urlObject



35
36
37
# File 'card/tmpsets/set/mod008-card-mod-format/all/css.rb', line 35

view :url, perms: :none do
  path mark: card.name, format: :css
end