lib/less/tree.rb
#
# Find a variable or mixin from a specific path
#
Find a variable or mixin from a specific path
Find a variable or mixin from a specific path
def find what = :var, path = []
      path.inject(self) do |branch, k|        
        if what == :var && k == path.last
          branch[:variables][ k ]
        else
          branch = branch[ k ] or raise PathError, path.join(' > ')
        end
      end
    end
def find what = :var , path = [ ] path . inject ( self ) do | branch , k | if what == :var && k == path . last branch [ :variables ] [ k ] else branch = branch [ k ] or raise PathError , path . join ( ' > ' ) end end end
Find a variable or mixin from a specific path
Find a variable or mixin from a specific path
what
path