Class: Malt::Format::LESS

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

Overview

LESS

See lesscss.org/

Instance Attribute Summary

Attributes inherited from Abstract

#options

Instance Method Summary collapse

Methods inherited from Abstract

#engine, engine, extensions, #extensions, #file, file_extension, #file_read, #file_type, #parse_type_from_data, #refile, register, #render, #render_into, #rendering_parameters, #scope_vs_data, #subtype, #text, #to, #to_default, #to_s, #type, #with, #with!

Instance Method Details

#css(*data, &content) ⇒ Object



25
26
27
28
29
# File 'lib/malt/formats/less.rb', line 25

def css(*data, &content)
  render_into(:css, *data, &content)
  #opts = options.merge(:text=>text, :file=>file, :format=>:css)
  #render_engine.render(opts)
end

#defaultObject

LESS default output type is CSS.



46
47
48
# File 'lib/malt/formats/less.rb', line 46

def default
  :css
end

#lessObject



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

def less(*)
  text
end

#to_css(*data, &content) ⇒ Object



32
33
34
35
36
# File 'lib/malt/formats/less.rb', line 32

def to_css(*data, &content)
  text = css(*data, &content)
  opts = options.merge(:text=>text, :file=>refile(:css), :type=>:css)
  CSS.new(opts)
end

#to_lessObject



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

def to_less(*)
  self
end