class Spectro::Spec::Signature

Representation of the required input/output types

Attributes

name[RW]
output_type[RW]
params_types[RW]

Public Class Methods

new(name, params_types, output_type) click to toggle source

@param [String] name local name of the algorith (not sure if needed) @param [<String>] param_types types of the expected input params @param [String] output_type type of the expected output

# File lib/spectro/spec/signature.rb, line 13
def initialize name, params_types, output_type
  self.name = name
  self.output_type = output_type
  self.params_types = params_types
end

Public Instance Methods

==(signature) click to toggle source
# File lib/spectro/spec/signature.rb, line 19
def == signature
  return \
    self.name == signature.name && \
    self.output_type == signature.output_type && \
    self.params_types == signature.params_types
end
to_hash() click to toggle source
# File lib/spectro/spec/signature.rb, line 26
def to_hash
  return {
    name: self.name,
    output_type: self.output_type,
    params_type: self.params_types
  }
end