Sha256: fc711f37cd559c03be4da5059f1f4cc355ae28ac93d67b9f85f82ad1be14f9ca
Contents?: true
Size: 858 Bytes
Versions: 4
Compression:
Stored size: 858 Bytes
Contents
# coding: utf-8 module Retter class Pages require 'retter/pages/index' require 'retter/pages/profile' require 'retter/pages/archive' require 'retter/pages/feed' require 'retter/pages/entry' require 'retter/pages/article' include Retter::Stationery attr_reader :index, :profile, :archive, :feed, :singleton_pages def initialize @singleton_pages = [Index, Profile, Archive, Feed].map(&:new) @index, @profile, @archive, @feed = *singleton_pages end def bind! print_entries singleton_pages.each(&:print) end def print_entries entries.each do |entry| entry_page = Entry.new(entry) entry_page.print entry.articles.each do |article| article_page = Article.new(article) article_page.print end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
retter-0.2.0 | lib/retter/pages.rb |
retter-0.1.3 | lib/retter/pages.rb |
retter-0.1.2 | lib/retter/pages.rb |
retter-0.1.1 | lib/retter/pages.rb |