Class: Less::Node::Mixin::Call

Inherits:
Object
  • Object
show all
Includes:
Entity
Defined in:
lib/less/engine/nodes/element.rb

Instance Attribute Summary

Attributes included from Entity

#parent

Instance Method Summary collapse

Methods included from Entity

#path, #root, #to_s

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

#inspectObject



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