Class: BELParser::Language::Syntax::InvalidFunctionSyntaxError

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

Overview

InvalidFunctionSyntaxError indicates a function name 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(function, spec, invalid_function) ⇒ InvalidFunctionSyntaxError

Returns a new instance of InvalidFunctionSyntaxError.



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

def initialize(function, spec, invalid_function)
  super(function, spec)
  @invalid_function = invalid_function
end

Instance Attribute Details

#invalid_functionObject (readonly)

Gets the invalid function literal.



26
27
28
# File 'lib/bel_parser/language/syntax/invalid_function.rb', line 26

def invalid_function
  @invalid_function
end

Instance Method Details

#msgObject



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

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