Class: BELParser::Language::Semantics::SignatureMappingWarning

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

Overview

SignatureMappingWarning defines a SemanticsWarning that indicates an unsuccessful signature match.

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(term_node, spec, signature, results) ⇒ SignatureMappingWarning



69
70
71
72
73
# File 'lib/bel_parser/language/semantics/signature_mapping.rb', line 69

def initialize(term_node, spec, signature, results)
  super(term_node, spec)
  @signature = signature
  @results   = results
end

Instance Attribute Details

#resultsObject (readonly)

Returns the value of attribute results.



67
68
69
# File 'lib/bel_parser/language/semantics/signature_mapping.rb', line 67

def results
  @results
end

#signatureObject (readonly)

Returns the value of attribute signature.



66
67
68
# File 'lib/bel_parser/language/semantics/signature_mapping.rb', line 66

def signature
  @signature
end

Instance Method Details

#to_sObject



75
76
77
78
79
# File 'lib/bel_parser/language/semantics/signature_mapping.rb', line 75

def to_s
  "    Term did not match function signature: \#{@signature.string_form}\n  MSG\nend\n".gsub(/ {12}/, '').gsub(/\n$/, '')