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.



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

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.



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

def relationship
  @relationship
end

Instance Method Details

#msgObject



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

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