Module: Card::Set::Abstract::Scss::CssFormat

Extended by:
Card::Set::AbstractFormat
Defined in:
platypus/tmp/set/gem-defaults/mod022-style/abstract/02_scss.rb

Instance Method Summary collapse

Instance Method Details

#compile_scss(scss, style = :expanded) ⇒ Object



19
20
21
22
23
24
25
26
# File 'platypus/tmp/set/gem-defaults/mod022-style/abstract/02_scss.rb', line 19

def compile_scss scss, style=:expanded
  # return scss if Rails.env.development?
  SassC::Engine.new(scss, style: style).render
rescue SassC::SyntaxError => e
  raise Card::Error,
        "SassC::SyntaxError (#{card.name}:#{e.sass_backtrace}): #{e.message}"
  # "#{#scss.lines[e.sass_line - 1]}\n" \
end

#view: compiledObject



11
12
13
# File 'platypus/tmp/set/gem-defaults/mod022-style/abstract/02_scss.rb', line 11

view :compiled do
  compile_scss _render_core
end

#view: coreObject



15
16
17
# File 'platypus/tmp/set/gem-defaults/mod022-style/abstract/02_scss.rb', line 15

view :core do
  process_content(_render_raw)
end