Class: Tilt::LessTemplate
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/tilt-2.0.11/lib/tilt/less.rb
Overview
Lessscss template implementation. See: lesscss.org/
Less templates do not support object scopes, locals, or yield.
Instance Attribute Summary
Attributes inherited from Template
Instance Method Summary collapse
Methods inherited from Template
#basename, default_mime_type, default_mime_type=, #eval_file, #initialize, metadata, #metadata, #name, #render
Constructor Details
This class inherits a constructor from Tilt::Template
Instance Method Details
#allows_script? ⇒ Boolean
25 26 27 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/tilt-2.0.11/lib/tilt/less.rb', line 25 def allows_script? false end |
#evaluate(scope, locals, &block) ⇒ Object
21 22 23 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/tilt-2.0.11/lib/tilt/less.rb', line 21 def evaluate(scope, locals, &block) @output ||= @engine.to_css() end |
#prepare ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/tilt-2.0.11/lib/tilt/less.rb', line 12 def prepare if ::Less.const_defined? :Engine @engine = ::Less::Engine.new(data) else parser = ::Less::Parser.new(.merge :filename => eval_file, :line => line) @engine = parser.parse(data) end end |