Class: Less::Node::Mixin::Call
- Includes:
- Entity
- Defined in:
- lib/less/engine/nodes/element.rb
Instance Attribute Summary
Attributes included from Entity
Instance Method Summary collapse
-
#initialize(mixin, params, parent) ⇒ Call
constructor
A new instance of Call.
- #inspect ⇒ Object
- #to_css(env = nil) ⇒ Object
Methods included from Entity
Constructor Details
#initialize(mixin, params, parent) ⇒ Call
Returns a new instance of Call.
214 215 216 217 218 219 220 221 |
# File 'lib/less/engine/nodes/element.rb', line 214 def initialize mixin, params, parent # puts "Initializing a Mixin::Call #{mixin}" @mixin = mixin self.parent = parent @params = params.each do |e| e.parent = self.parent end end |
Instance Method Details
#inspect ⇒ Object
229 230 231 |
# File 'lib/less/engine/nodes/element.rb', line 229 def inspect "#{@mixin.to_s} (#{@params})" end |
#to_css(env = nil) ⇒ Object
223 224 225 226 227 |
# File 'lib/less/engine/nodes/element.rb', line 223 def to_css env = nil # puts "\n\n" # puts "call .#{@mixin.name} #{@params} <#{@params.class}>" @mixin.call(@params.map {|e| e.evaluate(env) }) end |