class WAB::Impl::Gt

Matches a node that has a value greater than the provided value. If a integer or float is provided then both integer and floats are checked. If the value provided is a time then only time nodes are checked. Any other type results in an error.

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/gt.rb, line 15
def initialize(path, value)
  super(path)
  @value = value
end

Public Instance Methods

eval(data) click to toggle source
# File lib/wab/impl/exprs/gt.rb, line 20
def eval(data)
  data.get(path) > @value
end
native() click to toggle source
# File lib/wab/impl/exprs/gt.rb, line 24
def native()
  ['GT', path, @value]
end