Class: BELParser::Language::Semantics::SemanticsInvalidProteinModificationWarning
- Inherits:
-
SemanticsWarning
- Object
- SemanticsResult
- SemanticsWarning
- BELParser::Language::Semantics::SemanticsInvalidProteinModificationWarning
- Defined in:
- lib/bel_parser/language/semantics_ast_warnings.rb
Instance Attribute Summary
Attributes inherited from SemanticsResult
#expression_node, #specification
Instance Method Summary collapse
-
#initialize(expression_node, spec, expected_protein_modifications) ⇒ SemanticsInvalidProteinModificationWarning
constructor
A new instance of SemanticsInvalidProteinModificationWarning.
- #to_s ⇒ Object
Methods inherited from SemanticsWarning
Methods inherited from SemanticsResult
Constructor Details
#initialize(expression_node, spec, expected_protein_modifications) ⇒ SemanticsInvalidProteinModificationWarning
Returns a new instance of SemanticsInvalidProteinModificationWarning.
134 135 136 137 |
# File 'lib/bel_parser/language/semantics_ast_warnings.rb', line 134 def initialize(expression_node, spec, expected_protein_modifications) super(expression_node, spec) @expected_protein_modifications = expected_protein_modifications end |
Instance Method Details
#to_s ⇒ Object
139 140 141 142 |
# File 'lib/bel_parser/language/semantics_ast_warnings.rb', line 139 def to_s pmod = @expression_node.children[0].string_literal %(Protein modification of "#{pmod}" does not match allowed protein modifications: #{@expected_protein_modifications.join(', ')}) end |