lib/hx/listing/limit.rb in hx-0.6.1 vs lib/hx/listing/limit.rb in hx-0.7.0
- old
+ new
@@ -26,18 +26,18 @@
module Hx
module Listing
class Limit
- include Hx::Source
+ include Hx::Filter
- def initialize(source, options)
- @source = source
+ def initialize(input, options)
+ @input = input
@limit = options[:limit]
end
def each_entry
- @source.each_entry do |path, entry|
+ @input.each_entry do |path, entry|
if entry['items']
trimmed_entry = entry.dup
trimmed_entry['items'] = entry['items'][0...@limit]
else
trimmed_entry = entry