asciinema.org/app/models/asciicast_list.rb
2013-11-20 21:33:26 +01:00

16 lines
329 B
Ruby

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