Class: SexpBuilder::QueryBuilder::Deferred

Inherits:
SexpPath::Matcher::Base
  • Object
show all
Defined in:
lib/sexp_builder/query_builder.rb

Instance Method Summary collapse

Constructor Details

#initialize(receiver, name, args, real_name) ⇒ Deferred

Returns a new instance of Deferred.



31
32
33
34
35
36
# File 'lib/sexp_builder/query_builder.rb', line 31

def initialize(receiver, name, args, real_name)
  @receiver = receiver
  @name = name
  @args = args
  @real_name = real_name.to_s
end

Instance Method Details

#inspectObject



42
43
44
# File 'lib/sexp_builder/query_builder.rb', line 42

def inspect
  "rule(:#{@real_name})" 
end

#satisfy?(o, data = {}) ⇒ Boolean

Returns:

  • (Boolean)


38
39
40
# File 'lib/sexp_builder/query_builder.rb', line 38

def satisfy?(o, data={})
  @receiver.send(@name, *@args).satisfy?(o, data)
end