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.



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

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.



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

def invalid_function
  @invalid_function
end

Instance Method Details

#msgObject



38
39
40
# File 'lib/bel_parser/language/syntax/invalid_function.rb', line 38

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