class WAB::Impl::Eq
Matches a node that has the same value as provided at the end of the path provided. Any type is acceptable.#
Public Class Methods
new(path, value)
click to toggle source
Creates a new instance with the provided parameters.
- path
-
path to the value to compare
- value
-
value to compare against
Calls superclass method
# File lib/wab/impl/exprs/eq.rb, line 13 def initialize(path, value) super(path) @value = value end
Public Instance Methods
eval(data)
click to toggle source
# File lib/wab/impl/exprs/eq.rb, line 18 def eval(data) data.get(path) == @value end
native()
click to toggle source
# File lib/wab/impl/exprs/eq.rb, line 22 def native() ['EQ', path, @value] end