Class: BELParser::Language::Semantics::SemanticsInvalidNamespaceWarning
- Inherits:
-
SemanticsWarning
- Object
- SemanticsResult
- SemanticsWarning
- BELParser::Language::Semantics::SemanticsInvalidNamespaceWarning
- Defined in:
- lib/bel_parser/language/semantics_ast_warnings.rb
Instance Attribute Summary
Attributes inherited from SemanticsResult
#expression_node, #specification
Instance Method Summary collapse
-
#initialize(expression_node, spec, expected_namespaces) ⇒ SemanticsInvalidNamespaceWarning
constructor
A new instance of SemanticsInvalidNamespaceWarning.
- #to_s ⇒ Object
Methods inherited from SemanticsWarning
Methods inherited from SemanticsResult
Constructor Details
#initialize(expression_node, spec, expected_namespaces) ⇒ SemanticsInvalidNamespaceWarning
Returns a new instance of SemanticsInvalidNamespaceWarning.
73 74 75 76 |
# File 'lib/bel_parser/language/semantics_ast_warnings.rb', line 73 def initialize(expression_node, spec, expected_namespaces) super(expression_node, spec) @expected_namespaces = expected_namespaces end |
Instance Method Details
#to_s ⇒ Object
78 79 80 81 82 83 |
# File 'lib/bel_parser/language/semantics_ast_warnings.rb', line 78 def to_s namespace = @expression_node.namespace && @expression_node.namespace.identifier %(Invalid namespace "#{namespace}". Was expecting one of: #{@expected_namespaces.join(', ')}) end |