Class: SexpBuilder::QueryBuilder::Scope
- Inherits:
-
SexpPath::Matcher::Base
- Object
- SexpPath::Matcher::Base
- SexpBuilder::QueryBuilder::Scope
- Defined in:
- lib/sexp_builder/query_builder.rb
Instance Method Summary collapse
-
#initialize(type, instance) ⇒ Scope
constructor
A new instance of Scope.
- #satisfy?(o, data = {}) ⇒ Boolean
Constructor Details
#initialize(type, instance) ⇒ Scope
Returns a new instance of Scope.
18 19 20 21 |
# File 'lib/sexp_builder/query_builder.rb', line 18 def initialize(type, instance) @type = type @instance = instance end |
Instance Method Details
#satisfy?(o, data = {}) ⇒ Boolean
23 24 25 26 27 |
# File 'lib/sexp_builder/query_builder.rb', line 23 def satisfy?(o, data={}) if @instance.scope[1..-1].include?(@type) capture_match o, data end end |