Class: Malvolio::Compiler
- Inherits:
-
Object
- Object
- Malvolio::Compiler
- Defined in:
- lib/malvolio/compiler.rb
Instance Method Summary collapse
-
#initialize(path = nil, no_warnings = false) ⇒ Compiler
constructor
A new instance of Compiler.
- #run! ⇒ Object
Constructor Details
#initialize(path = nil, no_warnings = false) ⇒ Compiler
Returns a new instance of Compiler.
8 9 10 11 12 13 14 15 16 |
# File 'lib/malvolio/compiler.rb', line 8 def initialize(path = nil, no_warnings = false) @path = File.(path || ".") @config = YAML.load_file(File.join(@path, "config.yaml")) @compiler = Sass::Plugin::Compiler.new @compiler.on_compilation_error do |error, template, _css| raise Malvolio::CompilationError, compilation_error(error, template) end @no_warnings = no_warnings end |
Instance Method Details
#run! ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/malvolio/compiler.rb', line 18 def run! convert_html compile_sass_to_css inline_styles clean_tmp_folder print_colorized("New HTML email build was a success!", 32) end |