Exception: Liminal::UnsupportedNodeError
- Defined in:
- lib/liminal/errors.rb
Overview
Raised when a dry-schema AST node cannot be represented.
Instance Attribute Summary collapse
-
#operation ⇒ Object
readonly
Returns the value of attribute operation.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#source_name ⇒ Object
readonly
Returns the value of attribute source_name.
Instance Method Summary collapse
-
#initialize(source_name:, path:, operation:) ⇒ UnsupportedNodeError
constructor
A new instance of UnsupportedNodeError.
Constructor Details
#initialize(source_name:, path:, operation:) ⇒ UnsupportedNodeError
Returns a new instance of UnsupportedNodeError.
22 23 24 25 26 27 28 |
# File 'lib/liminal/errors.rb', line 22 def initialize(source_name:, path:, operation:) @source_name = source_name @path = path.map { |segment| segment.to_s.dup.freeze }.freeze @operation = operation super("Cannot compile #{source_name} at #{Path.display(path)}: " \ "unsupported AST node #{operation}.") end |
Instance Attribute Details
#operation ⇒ Object (readonly)
Returns the value of attribute operation.
20 21 22 |
# File 'lib/liminal/errors.rb', line 20 def operation @operation end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
20 21 22 |
# File 'lib/liminal/errors.rb', line 20 def path @path end |
#source_name ⇒ Object (readonly)
Returns the value of attribute source_name.
20 21 22 |
# File 'lib/liminal/errors.rb', line 20 def source_name @source_name end |