class DaedalSL::NestedBoolFilter

Public Class Methods

new(parent, options) click to toggle source
# File lib/daedal-sl/nested_bool_filter.rb, line 4
def initialize(parent, options)
  @parent = parent
  @base = Daedal::Filters::NestedFilter.new(options.merge(filter: Daedal::Filters::BoolFilter.new))
end

Public Instance Methods

must() { || ... } click to toggle source
# File lib/daedal-sl/nested_bool_filter.rb, line 9
def must
  if (result = yield)
    @base.filter.must << result
  end
end
must_not() { || ... } click to toggle source
# File lib/daedal-sl/nested_bool_filter.rb, line 21
def must_not
  if (result = yield)
    @base.filter.must_not << result
  end
end
should() { || ... } click to toggle source
# File lib/daedal-sl/nested_bool_filter.rb, line 15
def should
  if (result = yield)
    @base.filter.should << result
  end
end