Class: Wool::SexpAnalysis::Signature

Inherits:
Struct
  • Object
show all
Includes:
Comparable
Defined in:
lib/wool/analysis/signature.rb

Overview

A single signature in the Wool protocol system. This is just a simple specification of a method that an object can receive, either explicitly or implicitly defined, and the protocols of the return type and all arguments.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#argument_protocolsObject

Returns the value of attribute argument_protocols

Returns:

  • (Object)

    the current value of argument_protocols



7
8
9
# File 'lib/wool/analysis/signature.rb', line 7

def argument_protocols
  @argument_protocols
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



7
8
9
# File 'lib/wool/analysis/signature.rb', line 7

def name
  @name
end

#return_protocolObject

Returns the value of attribute return_protocol

Returns:

  • (Object)

    the current value of return_protocol



7
8
9
# File 'lib/wool/analysis/signature.rb', line 7

def return_protocol
  @return_protocol
end

Instance Method Details

#<=>(other) ⇒ Object



10
11
12
13
# File 'lib/wool/analysis/signature.rb', line 10

def <=>(other)
  [self.name, self.return_protocol, self.argument_protocols] <=>
      [other.name, other.return_protocol, other.argument_protocols]
end