Sha256: aebe3710554b3b210ce604e98f67bc9ba8d7ac897545a1439f13e37974267735

Contents?: true

Size: 1.96 KB

Versions: 116

Compression:

Stored size: 1.96 KB

Contents

require_relative '../../version2_0'
require_relative '../../function'
require_relative '../../signature'
require_relative '../../semantics'

module BELParser
  module Language
    module Version2_0
      module Functions
        # Products: Denotes the products of a reaction
        class Products
          extend Function

          SHORT       = :products
          LONG        = :products
          RETURN_TYPE = BELParser::Language::Version2_0::ReturnTypes::Products
          DESCRIPTION = 'Denotes the products of a reaction'.freeze

          def self.short
            SHORT
          end

          def self.long
            LONG
          end

          def self.return_type
            RETURN_TYPE
          end

          def self.description
            DESCRIPTION
          end

          def self.signatures
            SIGNATURES
          end

          module Signatures
            # ProductsSignature
            class ProductsSignature
              extend BELParser::Language::Signature

              private_class_method :new

              AST = BELParser::Language::Semantics::Builder.build do
                term(
                  function(
                    identifier(
                      function_of(Products))),
                  variadic_arguments(
                    term(
                      function(
                        identifier(
                          return_type_of(BELParser::Language::Version2_0::ReturnTypes::Abundance))))))
              end
              private_constant :AST

              STRING_FORM = 'products(F:abundance...)products'.freeze
              private_constant :STRING_FORM

              def self.semantic_ast
                AST
              end

              def self.string_form
                STRING_FORM
              end
            end
          end

          SIGNATURES = Signatures.constants.map do |const|
            Signatures.const_get(const)
          end.freeze
        end
      end
    end
  end
end

Version data entries

116 entries across 116 versions & 1 rubygems

Version Path
bel_parser-1.1.6-java lib/bel_parser/language/version2_0/functions/products.rb
bel_parser-1.1.6 lib/bel_parser/language/version2_0/functions/products.rb
bel_parser-1.1.5 lib/bel_parser/language/version2_0/functions/products.rb
bel_parser-1.1.4-java lib/bel_parser/language/version2_0/functions/products.rb
bel_parser-1.1.4 lib/bel_parser/language/version2_0/functions/products.rb
bel_parser-1.1.3-java lib/bel_parser/language/version2_0/functions/products.rb
bel_parser-1.1.3 lib/bel_parser/language/version2_0/functions/products.rb
bel_parser-1.1.2-java lib/bel_parser/language/version2_0/functions/products.rb
bel_parser-1.1.2 lib/bel_parser/language/version2_0/functions/products.rb
bel_parser-1.1.1-java lib/bel_parser/language/version2_0/functions/products.rb
bel_parser-1.1.1 lib/bel_parser/language/version2_0/functions/products.rb
bel_parser-1.0.8-java lib/bel_parser/language/version2_0/functions/products.rb
bel_parser-1.0.8 lib/bel_parser/language/version2_0/functions/products.rb
bel_parser-1.0.7-java lib/bel_parser/language/version2_0/functions/products.rb
bel_parser-1.0.7 lib/bel_parser/language/version2_0/functions/products.rb
bel_parser-1.0.6-java lib/bel_parser/language/version2_0/functions/products.rb
bel_parser-1.0.6 lib/bel_parser/language/version2_0/functions/products.rb
bel_parser-1.0.5-java lib/bel_parser/language/version2_0/functions/products.rb
bel_parser-1.0.5 lib/bel_parser/language/version2_0/functions/products.rb
bel_parser-1.0.4-java lib/bel_parser/language/version2_0/functions/products.rb