Class: Yalphabetize::OrderCheckers::AlphabeticalThenCapitalizedFirst

Inherits:
Base
  • Object
show all
Defined in:
lib/yalphabetize/order_checkers/alphabetical_then_capitalized_first.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_first.rb', line 7

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