Sha256: f2474dca7f599c62ea3ebdc7d988801ba0f6636bf50a8f84451c62832b4dbe2d

Contents?: true

Size: 266 Bytes

Versions: 4

Compression:

Stored size: 266 Bytes

Contents

module Sortable

    module ClassMethods
        def sort_by_title
            self.all.sort {|left, right| left.title <=> right.title}
        end

        def sort_by_name
            self.all.sort {|left, right| left.name <=> right.name}
        end
    end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
podcast-book-club-1.0.3 lib/podcast_book_club/concerns/sortable.rb
podcast-book-club-1.0.2 lib/podcast_book_club/concerns/sortable.rb
podcast-book-club-1.0.1 lib/podcast_book_club/concerns/sortable.rb
podcast-book-club-1.0.0 lib/podcast_book_club/concerns/sortable.rb