Class: DevSystem::HamlConverterShell
- Inherits:
-
ConverterShell
- Object
- Liza::Unit
- Liza::Controller
- Shell
- ConverterShell
- DevSystem::HamlConverterShell
- Defined in:
- lib/dev_system/sub/shell/converter_shells/haml_converter_shell.rb
Class Method Summary collapse
-
.convert(string, options = {}) ⇒ Object
Haml::Template.options = false Haml::Template.options = :html5 Haml::Template.options = ‘“’ Haml::Template.options = true.
- .default_options ⇒ Object
Methods inherited from ConverterShell
Methods inherited from Shell
cruby?, engine, jruby?, linux?, mac?, os, ruby_version, unix?, windows?
Methods inherited from Liza::Controller
color, inherited, on_connected
Methods inherited from Liza::Unit
const_missing, division, part, system, #system, test_class
Class Method Details
.convert(string, options = {}) ⇒ Object
Haml::Template.options = false Haml::Template.options = :html5 Haml::Template.options = ‘“’ Haml::Template.options = true
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/dev_system/sub/shell/converter_shells/haml_converter_shell.rb', line 14 def self.convert string, = {} log :lower, "default_options = #{.inspect} | options = #{.inspect}" = .merge if .any? && .any? log :lower, "#{string.size} chars (options: #{.inspect})" haml = string # template_options = {escape_html: true} = {} scope = Object.new locals = {} require "haml" Haml::Template.new() { haml }.render(scope, locals) end |
.default_options ⇒ Object
3 4 5 |
# File 'lib/dev_system/sub/shell/converter_shells/haml_converter_shell.rb', line 3 def self. DevBox[:shell].converters[:haml][:options] end |