Class: Malt::Format::SCSS

Inherits:
Abstract show all
Defined in:
lib/malt/formats/scss.rb

Overview

SCSS Format

This uses the same engine as Sass.

Instance Attribute Summary

Attributes inherited from Abstract

#options

Instance Method Summary collapse

Methods inherited from Abstract

engine, #engine, extensions, #extensions, #file, #parse_type_and_data, #refile, register, #render, #subtype, #text, #to, #to_default, #to_s, #type

Instance Method Details

#css(data = nil, &yld) ⇒ Object



25
26
27
# File 'lib/malt/formats/scss.rb', line 25

def css(data=nil, &yld)
  render_engine.render(:format=>:css, :text=>text, :file=>file, :type=>type)
end

#scssObject



15
16
17
# File 'lib/malt/formats/scss.rb', line 15

def scss(*)
  text
end

#to_css(data = nil, &yld) ⇒ Object



30
31
32
33
# File 'lib/malt/formats/scss.rb', line 30

def to_css(data=nil, &yld)
  result = css(data, &yld)
  CSS.new(:text=>result, :file=>refile(:css), :type=>:css)
end

#to_scssObject



20
21
22
# File 'lib/malt/formats/scss.rb', line 20

def to_scss(*)
  self
end