Class: Yalphabetize::OrderCheckers::AlphabeticalThenCapitalizedLast

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

Instance Method Summary collapse

Methods inherited from Base

new_for, #ordered?

Instance Method Details

#compare(string, other_string) ⇒ Object



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

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