Class: BELParser::Language::Syntax::UndefinedNamespaceValueWarning

Inherits:
SyntaxWarning show all
Defined in:
lib/bel_parser/language/syntax/undefined_namespace_value.rb

Overview

UndefinedNamespaceValueWarning indicates a value is missing from a namespace.

Instance Attribute Summary collapse

Attributes inherited from SyntaxResult

#expression_node, #specification

Instance Method Summary collapse

Methods inherited from SyntaxWarning

#failure?, #success?, #to_s

Methods inherited from SyntaxResult

#failure?, #success?, #to_s

Constructor Details

#initialize(value_node, spec, value) ⇒ UndefinedNamespaceValueWarning

Returns a new instance of UndefinedNamespaceValueWarning.



31
32
33
34
# File 'lib/bel_parser/language/syntax/undefined_namespace_value.rb', line 31

def initialize(value_node, spec, value)
  super(value_node, spec)
  @value = value
end

Instance Attribute Details

#undefined_valueObject (readonly)

Gets the undefined value.



29
30
31
# File 'lib/bel_parser/language/syntax/undefined_namespace_value.rb', line 29

def undefined_value
  @undefined_value
end

Instance Method Details

#msgObject



36
37
38
39
# File 'lib/bel_parser/language/syntax/undefined_namespace_value.rb', line 36

def msg
  prefix = @expression_node.prefix
  %(Undefined namespace value "#@value" for namespace "#{prefix}".)
end