class WAB::Impl::Has

Used to filters out all nodes that do not have a node at the end of the provided path.

Public Class Methods

new(path) click to toggle source

Creates a new instance with the provided parameters.

path

path to the value to check

Calls superclass method
# File lib/wab/impl/exprs/has.rb, line 12
def initialize(path)
  super(path)
end

Public Instance Methods

eval(data) click to toggle source
# File lib/wab/impl/exprs/has.rb, line 16
def eval(data)
  data.has?(path)
end
native() click to toggle source
# File lib/wab/impl/exprs/has.rb, line 20
def native()
  ['HAS', path]
end