lib/nanoc/base/source_data/item.rb
def compiled_content(params={})
      # Get rep
      rep_name = params[:rep] || :default
      rep = reps.find { |r| r.name == rep_name }
      if rep.nil?
        raise Nanoc::Errors::Generic,
          "No rep named #{rep_name.inspect} was found."
      end

      # Get rep's content
      rep.compiled_content(params)
    end
# Returns the compiled content from a given representation and a given
# snapshot. This is a convenience method that makes fetching compiled
# content easier.
#
# @option params [String] :rep (:default) The name of the representation
#   from which the compiled content should be fetched. By default, the
#   compiled content will be fetched from the default representation.
#
# @option params [String] :snapshot The name of the snapshot from which to
#   fetch the compiled content. By default, the returned compiled content
#   will be the content compiled right before the first layout call (if
#   any).
#
# @return [String] The compiled content of the given rep (or the default
#   rep if no rep is specified) at the given snapshot (or the default
#   snapshot if no snapshot is specified)
#
# @see ItemRep#compiled_content
Returns the compiled content from a given representation and a given
snapshot. This is a convenience method that makes fetching compiled
content easier.
Returns the compiled content from a given representation and a given snapshot . This is a convenience method that makes fetching compiled content easier .
def compiled_content(params={})
      rep_name = params[:rep] || :default
      rep = reps.find { |r| r.name == rep_name }
      if rep.nil?
        raise Nanoc::Errors::Generic,
          "No rep named #{rep_name.inspect} was found."
      end
      's content
      rep.compiled_content(params)
    end
def compiled_content ( params = { } ) rep_name = params [ :rep ] || :default rep = reps . find { | r | r . name == rep_name } if rep . nil? raise Nanoc :: Errors :: Generic , "No rep named #{rep_name.inspect} was found." end rep . compiled_content ( params ) end
Returns the compiled content from a given representation and a given
snapshot.
Returns the compiled content from a given representation and a given snapshot .
# Get rep # Get rep's content
The compiled content of the given rep (or the default rep if no rep is specified) at the given snapshot (or the default snapshot if no snapshot is specified)
The compiled content of the given rep ( or the default rep if no rep is specified ) at the given snapshot ( or the default snapshot if no snapshot is specified )
String
params
:snapshot The name of the snapshot from which to fetch the compiled content. By default, the returned compiled content will be the content compiled right before the first layout call (if any).
: snapshot The name of the snapshot from which to fetch the compiled content . By default the returned compiled content will be the content compiled right before the first layout call ( if any ) .
see
None