Class: BELParser::Language::Semantics::FunctionDeprecationWarning

Inherits:
SemanticsWarning show all
Defined in:
lib/bel_parser/language/semantics/function_deprecation.rb

Overview

Represents a SemanticsWarning when a Parsers::AST::Function references a deprecated function for the BELParser::Language::Specification.

Instance Attribute Summary collapse

Attributes inherited from SemanticsResult

#expression_node, #specification

Instance Method Summary collapse

Methods inherited from SemanticsWarning

#failure?, #success?

Methods inherited from SemanticsResult

#failure?, #msg, #success?

Constructor Details

#initialize(function_node, spec, deprecated_function) ⇒ FunctionDeprecationWarning

Returns a new instance of FunctionDeprecationWarning.



33
34
35
36
# File 'lib/bel_parser/language/semantics/function_deprecation.rb', line 33

def initialize(function_node, spec, deprecated_function)
  super(function_node, spec)
  @deprecated_function = deprecated_function
end

Instance Attribute Details

#deprecated_functionObject (readonly)

Returns the value of attribute deprecated_function.



31
32
33
# File 'lib/bel_parser/language/semantics/function_deprecation.rb', line 31

def deprecated_function
  @deprecated_function
end

Instance Method Details

#to_sObject



38
39
40
# File 'lib/bel_parser/language/semantics/function_deprecation.rb', line 38

def to_s
  %(Function "#{deprecated_function}" is deprecated.)
end