Class: BELParser::Language::Semantics::SemanticsWarning

Inherits:
SemanticsResult show all
Defined in:
lib/bel_parser/language/semantics_warning.rb

Overview

SemanticsWarning defines a SemanticsResult that should be regarded as a warning with the expression.

Instance Attribute Summary

Attributes inherited from SemanticsResult

#expression_node, #specification

Instance Method Summary collapse

Methods inherited from SemanticsResult

#msg

Constructor Details

#initialize(expression_node, specification) ⇒ SemanticsWarning

Returns a new instance of SemanticsWarning.



9
10
11
# File 'lib/bel_parser/language/semantics_warning.rb', line 9

def initialize(expression_node, specification)
  super(expression_node, specification)
end

Instance Method Details

#failure?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/bel_parser/language/semantics_warning.rb', line 17

def failure?
  true
end

#success?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/bel_parser/language/semantics_warning.rb', line 13

def success?
  false
end

#to_sObject



21
22
23
# File 'lib/bel_parser/language/semantics_warning.rb', line 21

def to_s
  "Warning: #{msg}"
end