Class: Wool::SexpAnalysis::Protocols::Base
- Inherits:
-
Object
- Object
- Wool::SexpAnalysis::Protocols::Base
- Includes:
- Comparable
- Defined in:
- lib/wool/analysis/protocols.rb
Overview
The base class for all protocols.
Direct Known Subclasses
Instance Method Summary collapse
-
#<=>(other) ⇒ Object
Compares the protocol to another protocol by comparing their signatures list (sorted).
-
#signatures ⇒ Array<Signature>
Returns the list of all known signatures that this protocol responds to.
Instance Method Details
#<=>(other) ⇒ Object
Compares the protocol to another protocol by comparing their signatures list (sorted).
24 25 26 |
# File 'lib/wool/analysis/protocols.rb', line 24 def <=>(other) self.signatures.sort <=> other.signatures.sort end |
#signatures ⇒ Array<Signature>
Returns the list of all known signatures that this protocol responds to.
18 19 20 |
# File 'lib/wool/analysis/protocols.rb', line 18 def signatures raise NotImplementedError.new('You must implement #signatures yourself.') end |