asciinema.org/app/models/asciicast_list.rb

16 lines
329 B
Ruby
Raw Normal View History

class AsciicastList
attr_reader :category, :order, :repository
def initialize(category, order, repository = Asciicast)
@category = (category || :all).to_sym
@order = (order || :recency).to_sym
@repository = repository
end
def items
repository.for_category_ordered(category, order)
end
end