Module: Nanoc::WithRepsViewMixin
- Included in:
- ItemWithRepsView
- Defined in:
- lib/nanoc/base/views/mixins/with_reps_view_mixin.rb
Instance Method Summary (collapse)
-
- (String) compiled_content(rep: :default, snapshot: :pre)
Returns the compiled content.
-
- (String) path(rep: :default, snapshot: :last)
Returns the item path, as used when being linked to.
-
- (Nanoc::ItemRepCollectionView) reps
Returns the representations of this item.
Instance Method Details
- (String) compiled_content(rep: :default, snapshot: :pre)
Returns the compiled content.
15 16 17 |
# File 'lib/nanoc/base/views/mixins/with_reps_view_mixin.rb', line 15 def compiled_content(rep: :default, snapshot: :pre) reps.fetch(rep).compiled_content(snapshot: snapshot) end |
- (String) path(rep: :default, snapshot: :last)
Returns the item path, as used when being linked to. It starts with a slash and it is relative to the output directory. It does not include the path to the output directory. It will not include the filename if the filename is an index filename.
32 33 34 |
# File 'lib/nanoc/base/views/mixins/with_reps_view_mixin.rb', line 32 def path(rep: :default, snapshot: :last) reps.fetch(rep).path(snapshot: snapshot) end |
- (Nanoc::ItemRepCollectionView) reps
Returns the representations of this item.
39 40 41 |
# File 'lib/nanoc/base/views/mixins/with_reps_view_mixin.rb', line 39 def reps Nanoc::ItemRepCollectionView.new(@context.reps[unwrap], @context) end |