Exception: Liminal::UnsupportedPredicateError
- Defined in:
- lib/liminal/errors.rb
Overview
Raised when a dry predicate cannot be represented.
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#predicate ⇒ Object
readonly
Returns the value of attribute predicate.
-
#source_name ⇒ Object
readonly
Returns the value of attribute source_name.
Instance Method Summary collapse
-
#initialize(source_name:, path:, predicate:, detail: nil) ⇒ UnsupportedPredicateError
constructor
A new instance of UnsupportedPredicateError.
Constructor Details
#initialize(source_name:, path:, predicate:, detail: nil) ⇒ UnsupportedPredicateError
Returns a new instance of UnsupportedPredicateError.
35 36 37 38 39 40 41 42 43 44 |
# File 'lib/liminal/errors.rb', line 35 def initialize(source_name:, path:, predicate:, detail: nil) @source_name = source_name @path = path.map { |segment| segment.to_s.dup.freeze }.freeze @predicate = predicate detail_text = detail ? " (#{detail})" : "" super(<<~MESSAGE.chomp) Cannot compile #{source_name} at #{Path.display(path)}: unsupported predicate #{predicate}#{detail_text}. Add an authoritative override or register a predicate handler. MESSAGE end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
33 34 35 |
# File 'lib/liminal/errors.rb', line 33 def path @path end |
#predicate ⇒ Object (readonly)
Returns the value of attribute predicate.
33 34 35 |
# File 'lib/liminal/errors.rb', line 33 def predicate @predicate end |
#source_name ⇒ Object (readonly)
Returns the value of attribute source_name.
33 34 35 |
# File 'lib/liminal/errors.rb', line 33 def source_name @source_name end |