Class: Nanoc::Int::ItemRepBuilder Private
- Inherits:
-
Object
- Object
- Nanoc::Int::ItemRepBuilder
- Defined in:
- lib/nanoc/base/services/item_rep_builder.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary collapse
- #reps ⇒ Object readonly private
Instance Method Summary collapse
-
#initialize(site, action_provider, reps) ⇒ ItemRepBuilder
constructor
private
A new instance of ItemRepBuilder.
- #run ⇒ Object private
Constructor Details
#initialize(site, action_provider, reps) ⇒ ItemRepBuilder
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of ItemRepBuilder.
6 7 8 9 10 |
# File 'lib/nanoc/base/services/item_rep_builder.rb', line 6 def initialize(site, action_provider, reps) @site = site @action_provider = action_provider @reps = reps end |
Instance Attribute Details
#reps ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
4 5 6 |
# File 'lib/nanoc/base/services/item_rep_builder.rb', line 4 def reps @reps end |
Instance Method Details
#run ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
12 13 14 15 16 17 18 19 20 |
# File 'lib/nanoc/base/services/item_rep_builder.rb', line 12 def run @site.items.each do |item| @action_provider.rep_names_for(item).each do |rep_name| @reps << Nanoc::Int::ItemRep.new(item, rep_name) end end Nanoc::Int::ItemRepRouter.new(@reps, @action_provider, @site).run end |