class ParamsReady::Query::CustomPredicateBuilder
Public Class Methods
new(name, altn: nil)
click to toggle source
Calls superclass method
ParamsReady::AbstractBuilder::new
# File lib/params_ready/query/custom_predicate.rb, line 52 def initialize(name, altn: nil) super CustomPredicateDefinition.new(name, altn: altn) end
Public Instance Methods
data_object_handles()
click to toggle source
# File lib/params_ready/query/custom_predicate.rb, line 61 def data_object_handles [@definition.name, @definition.altn] end
eligible(&proc)
click to toggle source
# File lib/params_ready/query/custom_predicate.rb, line 69 def eligible(&proc) @definition.set_eligibility_test(proc) end
test(&proc)
click to toggle source
# File lib/params_ready/query/custom_predicate.rb, line 73 def test(&proc) @definition.set_test(proc) end
to_query(&proc)
click to toggle source
# File lib/params_ready/query/custom_predicate.rb, line 65 def to_query(&proc) @definition.set_to_query(proc) end
type_builder_instance(type_name, name, *args, altn:, **opts, &block)
click to toggle source
# File lib/params_ready/query/custom_predicate.rb, line 56 def type_builder_instance(type_name, name, *args, altn:, **opts, &block) builder_class = Builder.builder(type_name) builder_class.instance(name, *args, altn: altn, **opts) end