Class: BELParser::Script::Syntax::UndefinedAnnotationValueWarning

Inherits:
Language::Syntax::SyntaxWarning show all
Defined in:
lib/bel_parser/script/syntax/undefined_annotation_value.rb

Overview

UndefinedAnnotationValueWarning represents an undefined annotation value while checking a SET annotation.

Instance Attribute Summary collapse

Attributes inherited from Language::Syntax::SyntaxResult

#expression_node, #specification

Instance Method Summary collapse

Methods inherited from Language::Syntax::SyntaxWarning

#failure?, #success?, #to_s

Methods inherited from Language::Syntax::SyntaxResult

#failure?, #success?, #to_s

Constructor Details

#initialize(set_node, prefix, value) ⇒ UndefinedAnnotationValueWarning

Returns a new instance of UndefinedAnnotationValueWarning.



74
75
76
77
78
# File 'lib/bel_parser/script/syntax/undefined_annotation_value.rb', line 74

def initialize(set_node, prefix, value)
  super(set_node, nil)
  @prefix = prefix
  @value  = value
end

Instance Attribute Details

#prefixObject (readonly)

Gets the prefix.



70
71
72
# File 'lib/bel_parser/script/syntax/undefined_annotation_value.rb', line 70

def prefix
  @prefix
end

#valueObject (readonly)

Gets the undefined annotation value.



72
73
74
# File 'lib/bel_parser/script/syntax/undefined_annotation_value.rb', line 72

def value
  @value
end

Instance Method Details

#msgObject



80
81
82
# File 'lib/bel_parser/script/syntax/undefined_annotation_value.rb', line 80

def msg
  %(Undefined annotation value "#@value" for annotation "#@prefix".)
end