Class: Retter::Binder
- Inherits:
-
Object
- Object
- Retter::Binder
- Extended by:
- Configurable
- Defined in:
- lib/retter/binder.rb
Instance Method Summary collapse
- #bind! ⇒ Object
- #bind_entries ⇒ Object
-
#initialize(entries) ⇒ Binder
constructor
A new instance of Binder.
Methods included from Configurable
configurable, define_configurable_method, define_instance_shortcut_method
Constructor Details
#initialize(entries) ⇒ Binder
Returns a new instance of Binder.
9 10 11 12 |
# File 'lib/retter/binder.rb', line 9 def initialize(entries) @entries = entries @singleton_pages = find_singleton_pages end |
Instance Method Details
#bind! ⇒ Object
14 15 16 17 18 |
# File 'lib/retter/binder.rb', line 14 def bind! bind_entries @singleton_pages.each(&:bind) end |
#bind_entries ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/retter/binder.rb', line 20 def bind_entries @entries.each do |entry| entry_page = Page::Entry.new(entry) entry_page.bind entry.articles.each do |article| article_page = Page::Article.new(article) article_page.bind end end end |