Module: Bridgetown::Prioritizable

Included in:
Plugin, Rack::Routes
Defined in:
lib/bridgetown-core/concerns/prioritizable.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



42
43
44
# File 'lib/bridgetown-core/concerns/prioritizable.rb', line 42

def self.included(klass)
  klass.extend ClassMethods
end

Instance Method Details

#<=>(other) ⇒ Integer

Spaceship is priority [higher -> lower]

Parameters:

  • other (object)

    The object to be compared.

Returns:

  • (Integer)

    -1, 0, 1.



50
51
52
# File 'lib/bridgetown-core/concerns/prioritizable.rb', line 50

def <=>(other)
  self.class <=> other.class
end