Class: SexpBuilder::QueryBuilder

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

Defined Under Namespace

Classes: Data, Deferred, Scope

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.instanceObject

Returns the value of attribute instance.



48
49
50
# File 'lib/sexp_builder/query_builder.rb', line 48

def instance
  @instance
end

Class Method Details

.block(&blk) ⇒ Object



60
61
62
# File 'lib/sexp_builder/query_builder.rb', line 60

def block(&blk)
  SexpPath::Matcher::Block.new(&blk)
end

.make(context, instance) ⇒ Object



50
51
52
53
54
# File 'lib/sexp_builder/query_builder.rb', line 50

def make(context, instance)
  query_builder = Class.new(QueryBuilder) { extend context.query_scope }
  query_builder.instance = instance
  query_builder
end

.scope(type) ⇒ Object



56
57
58
# File 'lib/sexp_builder/query_builder.rb', line 56

def scope(type)
  Scope.new(type, instance)
end