# File lib/less/engine/nodes/element.rb, line 174 def nearest ident, type = nil ary = type || ident =~ /^[.#]/ ? :elements : :variables path.map do |node| node.send(ary).find {|i| i.to_s == ident } end.compact.first.tap do |result| raise VariableNameError, ("#{ident} in #{self.to_s}") if result.nil? && type != :mixin end end