Class: BELParser::Language::Semantics::MultipleSubjectObjectWarning
- Inherits:
-
SemanticsWarning
- Object
- SemanticsResult
- SemanticsWarning
- BELParser::Language::Semantics::MultipleSubjectObjectWarning
- Defined in:
- lib/bel_parser/language/semantics/multiple_subject_object.rb
Overview
Represents a SemanticsWarning when a Parsers::AST::Statement includes the subject term as an argument of an object list term.
Instance Attribute Summary
Attributes inherited from SemanticsResult
#expression_node, #specification
Instance Method Summary collapse
-
#initialize(stmt_node, spec, rel) ⇒ MultipleSubjectObjectWarning
constructor
A new instance of MultipleSubjectObjectWarning.
- #to_s ⇒ Object
Methods inherited from SemanticsWarning
Methods inherited from SemanticsResult
Constructor Details
#initialize(stmt_node, spec, rel) ⇒ MultipleSubjectObjectWarning
Returns a new instance of MultipleSubjectObjectWarning.
42 43 44 45 |
# File 'lib/bel_parser/language/semantics/multiple_subject_object.rb', line 42 def initialize(stmt_node, spec, rel) super(stmt_node, spec) @rel = rel end |
Instance Method Details
#to_s ⇒ Object
47 48 49 50 51 52 |
# File 'lib/bel_parser/language/semantics/multiple_subject_object.rb', line 47 def to_s <<-MSG.gsub(/ {12}/, '').delete("\n") A "#{@rel.long}" statement cannot use the subject term as an object list() argument. MSG end |