class Mhc::Query::Expression
Public Class Methods
new(context)
click to toggle source
# File lib/mhc/query.rb, line 22 def initialize(context) @terms = [Term.new(context)] @terms << Term.new(context) while context.eat_if(:orop) end
Public Instance Methods
to_proc()
click to toggle source
# File lib/mhc/query.rb, line 27 def to_proc @procs = @terms.map(&:to_proc) return lambda {|ev| @procs.any? {|p| p.call(ev)}} end