You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
329 B
Ruby
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
|