class BELParser::Language::Semantics::SemanticAminoAcidOf
Public Class Methods
new(amino_acids, **properties)
click to toggle source
Calls superclass method
BELParser::Language::Semantics::SemanticASTNode::new
# File lib/bel_parser/language/semantics_ast.rb, line 713 def initialize(amino_acids, **properties) properties[:hashed] = Hash[amino_acids.map { |t| [t, true] }] super(:amino_acid_of, amino_acids, properties) end
Public Instance Methods
amino_acids()
click to toggle source
# File lib/bel_parser/language/semantics_ast.rb, line 718 def amino_acids children end
match(value_node, spec, will_match_partial = false)
click to toggle source
# File lib/bel_parser/language/semantics_ast.rb, line 722 def match(value_node, spec, will_match_partial = false) string_literal_sym = value_node.children[0].string_literal.to_sym return success(value_node, spec) if @hashed[:*] if @hashed.key?(string_literal_sym) success(value_node, spec) else invalid_amino_acid_warning(value_node, spec, @hashed.keys) end end