Class: Liminal::PredicateContext

Inherits:
Struct
  • Object
show all
Defined in:
lib/liminal/predicate_registry.rb

Overview

Context supplied to custom predicate handlers.

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#dialectObject

Returns the value of attribute dialect

Returns:

  • (Object)

    the current value of dialect



9
10
11
# File 'lib/liminal/predicate_registry.rb', line 9

def dialect
  @dialect
end

#pathObject

Returns the value of attribute path

Returns:

  • (Object)

    the current value of path



9
10
11
# File 'lib/liminal/predicate_registry.rb', line 9

def path
  @path
end