class BELParser::Language::Semantics::RelationshipNotMultipleWarning
Represents a {SemanticsWarning} when a statement has a relationship that cannot reference multiple objects.
Public Class Methods
new(statement_node, spec, rel)
click to toggle source
Calls superclass method
# File lib/bel_parser/language/semantics/relationship_not_listable.rb, line 42 def initialize(statement_node, spec, rel) super(statement_node, spec) @rel = rel end
Public Instance Methods
to_s()
click to toggle source
# File lib/bel_parser/language/semantics/relationship_not_listable.rb, line 47 def to_s multiple_relationships = @specification .listable_relationships .map(&:long) .join(', ') <<-MSG.gsub(/ {12}/, '').strip Statement must use a multiple relationship with a list object. The "#{@rel.long}" relationship cannot reference multiple objects. Multiple Relationships: #{multiple_relationships} MSG end