Class: BELParser::Language::Syntax::InvalidRelationshipSyntaxError

Inherits:
SyntaxError show all
Defined in:
lib/bel_parser/language/syntax/invalid_relationship.rb

Overview

InvalidRelationshipSyntaxError indicates a relationship was invalid.

Instance Attribute Summary collapse

Attributes inherited from SyntaxResult

#expression_node, #specification

Instance Method Summary collapse

Methods inherited from SyntaxError

#failure?, #success?, #to_s

Methods inherited from SyntaxResult

#failure?, #success?, #to_s

Constructor Details

#initialize(stmt_node, spec, relationship) ⇒ InvalidRelationshipSyntaxError

Returns a new instance of InvalidRelationshipSyntaxError.



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

def initialize(stmt_node, spec, relationship)
  super(stmt_node, spec)
  @relationship = relationship
end

Instance Attribute Details

#relationshipObject (readonly)

Gets the relationship literal that was invalid according to a BEL specification.



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

def relationship
  @relationship
end

Instance Method Details

#msgObject



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

def msg
  %(Invalid relationship "#{relationship}".)
end