class BELParser::Language::Semantics::SemanticsResult

SemanticsResult represents the successful outcome of applying a {SemanticsFunction}.

Attributes

expression_node[R]
specification[R]

Public Class Methods

new(expression_node, specification) click to toggle source
# File lib/bel_parser/language/semantics_result.rb, line 9
def initialize(expression_node, specification)
  @expression_node = expression_node
  @specification   = specification
end

Public Instance Methods

failure?() click to toggle source
# File lib/bel_parser/language/semantics_result.rb, line 18
def failure?
  false
end
msg() click to toggle source

@abstract Subclass and override {#msg} to provide the message.

# File lib/bel_parser/language/semantics_result.rb, line 23
def msg
  "Successful semantic validation of #{@expression_node.type}."
end
success?() click to toggle source
# File lib/bel_parser/language/semantics_result.rb, line 14
def success?
  true
end
to_s() click to toggle source
# File lib/bel_parser/language/semantics_result.rb, line 27
def to_s
  "Info: #{msg}"
end