Module: Card::Set::Type::Scss::Format

Extended by:
AbstractFormat
Defined in:
card/tmpsets/set/mod019-card-mod-style/type/scss.rb,
card/tmpsets/set/mod020-card-mod-style/type/scss.rb

Instance Method Summary collapse

Instance Method Details

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



15
16
17
18
19
20
21
# File 'card/tmpsets/set/mod019-card-mod-style/type/scss.rb', line 15

def compile_scss scss, style=:expanded
  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: coreObject



11
12
13
# File 'card/tmpsets/set/mod019-card-mod-style/type/scss.rb', line 11

view :core, cache: :never do
  compile_scss(process_content(_render_raw))
end