Class: BELParser::Language::Semantics::NonObjectListWarning

Inherits:
SemanticsWarning show all
Defined in:
lib/bel_parser/language/semantics/non_object_list.rb

Overview

Represents a SemanticsWarning when a multiple relationship Parsers::AST::Statement does not reference an object list term.

Instance Attribute Summary

Attributes inherited from SemanticsResult

#expression_node, #specification

Instance Method Summary collapse

Methods inherited from SemanticsWarning

#failure?, #success?

Methods inherited from SemanticsResult

#failure?, #msg, #success?

Constructor Details

#initialize(statement_node, spec, rel) ⇒ NonObjectListWarning

Returns a new instance of NonObjectListWarning.



49
50
51
52
# File 'lib/bel_parser/language/semantics/non_object_list.rb', line 49

def initialize(statement_node, spec, rel)
  super(statement_node, spec)
  @rel = rel
end

Instance Method Details

#to_sObject



54
55
56
# File 'lib/bel_parser/language/semantics/non_object_list.rb', line 54

def to_s
  %(The "#{@rel.long}" relationship must take a list() object term.)
end