Class: Yalphabetize::OrderCheckers::AlphabeticalThenCapitalizedLast

Inherits:
Base
  • Object
show all
Defined in:
lib/yalphabetize/order_checkers/alphabetical_then_capitalized_last.rb

Class Method Summary collapse

Methods inherited from Base

ordered?

Class Method Details

.compare(string, other_string) ⇒ Object



7
8
9
# File 'lib/yalphabetize/order_checkers/alphabetical_then_capitalized_last.rb', line 7

def self.compare(string, other_string)
  alphabetical_comparison(string, other_string).nonzero? || string.swapcase <=> other_string.swapcase
end