Class: Yuzu::PostProcessors::RecentPostsPostProcessor
Instance Attribute Summary
#name
Instance Method Summary
collapse
#match, postprocessors, registry
Constructor Details
Returns a new instance of RecentPostsPostProcessor.
6
7
8
|
# File 'lib/yuzu/postprocessors/recent_posts.rb', line 6
def initialize
@name = :recent_posts
end
|
Instance Method Details
#get_value(website_file) ⇒ Object
18
19
20
21
22
|
# File 'lib/yuzu/postprocessors/recent_posts.rb', line 18
def get_value(website_file)
processable = website_file.blog_folder.all_processable_children
user_authored = processable.reject {|file| file.generated? or file.index?}
user_authored.sort {|a, b| b.modified_at <=> a.modified_at}[0...10]
end
|
10
11
|
# File 'lib/yuzu/postprocessors/recent_posts.rb', line 10
def regex
end
|
#value(website_file) ⇒ Object
13
14
15
16
|
# File 'lib/yuzu/postprocessors/recent_posts.rb', line 13
def value(website_file)
@value ||= get_value(website_file)
end
|