Class: Nanoc::CompilationItemRepView
- Inherits:
-
BasicItemRepView
- Object
- View
- BasicItemRepView
- Nanoc::CompilationItemRepView
- Defined in:
- lib/nanoc/base/views/compilation_item_rep_view.rb
Instance Method Summary collapse
-
#compiled_content(snapshot: nil) ⇒ String
Returns the compiled content.
-
#item_view_class ⇒ Object
abstract
-
#raw_path(snapshot: :last) ⇒ String
Returns the item rep’s raw path.
Methods inherited from BasicItemRepView
#==, #eql?, #hash, #inspect, #item, #name, #path, #snapshot?
Methods inherited from View
Instance Method Details
#compiled_content(snapshot: nil) ⇒ String
Returns the compiled content.
37 38 39 40 |
# File 'lib/nanoc/base/views/compilation_item_rep_view.rb', line 37 def compiled_content(snapshot: nil) @context.dependency_tracker.bounce(unwrap.item, compiled_content: true) @context.snapshot_repo.compiled_content(rep: unwrap, snapshot: snapshot) end |
#item_view_class ⇒ Object
This method is abstract.
6 7 8 |
# File 'lib/nanoc/base/views/compilation_item_rep_view.rb', line 6 def item_view_class Nanoc::CompilationItemView end |
#raw_path(snapshot: :last) ⇒ String
Returns the item rep’s raw path. It includes the path to the output directory and the full filename.
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/nanoc/base/views/compilation_item_rep_view.rb', line 17 def raw_path(snapshot: :last) @context.dependency_tracker.bounce(unwrap.item, compiled_content: true) res = @item_rep.raw_path(snapshot: snapshot) unless @item_rep.compiled? Fiber.yield(Nanoc::Int::Errors::UnmetDependency.new(@item_rep)) end res end |