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

Extended by:
Card::Set::AbstractFormat
Defined in:
platypus/tmp/set/gem-defaults/mod004-format/all/css.rb

Instance Method Summary collapse

Instance Method Details

#default_nest_viewObject



9
10
11
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/css.rb', line 9

def default_nest_view
  :raw
end

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



38
39
40
41
42
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/css.rb', line 38

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



13
14
15
16
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/css.rb', line 13

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

#view: contentObject



22
23
24
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/css.rb', line 22

view :content do
  _render_core
end

#view: importObject



30
31
32
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/css.rb', line 30

view :import do
  _render_core
end

#view: titledObject



18
19
20
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/css.rb', line 18

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

#view: unknownObject



26
27
28
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/css.rb', line 26

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

#view: urlObject



34
35
36
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/css.rb', line 34

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