Class: Liminal::PredicateContext
- Inherits:
-
Struct
- Object
- Struct
- Liminal::PredicateContext
- Defined in:
- lib/liminal/predicate_registry.rb
Overview
Context supplied to custom predicate handlers.
Instance Attribute Summary collapse
-
#dialect ⇒ Object
Returns the value of attribute dialect.
-
#path ⇒ Object
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(path:, dialect:) ⇒ PredicateContext
constructor
A new instance of PredicateContext.
Constructor Details
#initialize(path:, dialect:) ⇒ PredicateContext
Returns a new instance of PredicateContext.
10 11 12 13 14 |
# File 'lib/liminal/predicate_registry.rb', line 10 def initialize(path:, dialect:) immutable_path = path.map { |segment| segment.to_s.dup.freeze }.freeze super(path: immutable_path, dialect: dialect) freeze end |
Instance Attribute Details
#dialect ⇒ Object
Returns the value of attribute dialect
9 10 11 |
# File 'lib/liminal/predicate_registry.rb', line 9 def dialect @dialect end |
#path ⇒ Object
Returns the value of attribute path
9 10 11 |
# File 'lib/liminal/predicate_registry.rb', line 9 def path @path end |