class Haml::Exec::CSS2Sass
The ‘css2sass` executable.
def initialize(args)
-
args
(Array
) -- The command-line arguments
def initialize(args) super @module_opts = {} require 'sass/css' end
def process_result
Processes the options set by the command-line arguments,
def process_result super input = @options[:input] output = @options[:output] output.write(::Sass::CSS.new(input, @module_opts).render) end
def set_opts(opts)
-
opts
(OptionParser
) --
def set_opts(opts) opts.banner = <<END css2sass [options] [INPUT] [OUTPUT] ption: Transforms a CSS file into corresponding Sass code. s: opts.on('--old', 'Output the old-style ":prop val" property syntax') do @module_opts[:old] = true end opts.on_tail('-a', '--alternate', 'Ignored') {} super end