module Q::Binomial2

Public Instance Methods

eval(scope) click to toggle source
# File lib/q/parser.rb, line 660
def eval scope
  if has_feet?
    return operator.apply(scope, head, feet)
  end

  scope['_'] = head.eval(scope)
end
feet() click to toggle source
# File lib/q/parser.rb, line 672
def feet
  return nil if not has_feet?

  tail.elements.first.feet
end
has_feet?() click to toggle source
# File lib/q/parser.rb, line 668
def has_feet?
  not tail.nil? and not tail.elements.first.nil? and not tail.elements.first.feet.nil?
end
operator() click to toggle source
# File lib/q/parser.rb, line 678
def operator
  return nil if not has_feet?

  tail.elements.first.operator
end