Namespace

Less

Public Class Methods

less() click to toggle source
# File lib/less/rails/helpers.rb, line 3
def self.less
  @less
end
register_rails_helper(name, &block) click to toggle source
# File lib/less/rails/helpers.rb, line 7
def self.register_rails_helper(name, &block)
  tree = @loader.require('less/tree')
  tree.functions[name] = lambda do |*args|
    # args: (this, node) v8 >= 0.10, otherwise (node)
    raise ArgumentError, "missing node" if args.empty?
    tree[:Anonymous].new block.call(tree, args.last)
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.