class Yalphabetize::OrderCheckers::Custom
Attributes
Public Class Methods
Source
# File lib/yalphabetize/order_checkers/custom.rb, line 6 def initialize(allowed_order) super() @allowed_order = allowed_order end
Calls superclass method
Public Instance Methods
Source
# File lib/yalphabetize/order_checkers/custom.rb, line 11 def compare(string, other_string) allowed_order.index(string) <=> allowed_order.index(other_string) end