Class: Deface::SlimConverter
- Inherits:
-
Object
- Object
- Deface::SlimConverter
- Defined in:
- lib/deface/slim_converter.rb
Instance Method Summary collapse
-
#initialize(template, options = {}) ⇒ SlimConverter
constructor
A new instance of SlimConverter.
- #result ⇒ Object
Constructor Details
#initialize(template, options = {}) ⇒ SlimConverter
Returns a new instance of SlimConverter.
6 7 8 |
# File 'lib/deface/slim_converter.rb', line 6 def initialize(template, = {}) @template = template end |
Instance Method Details
#result ⇒ Object
10 11 12 13 |
# File 'lib/deface/slim_converter.rb', line 10 def result conv = defined?(Slim::RailsTemplate) ? rails_converter : generic_converter conv.call(@template).gsub(/<%\s*%>/, '') end |