lib/nanoc/base/source_data/item.rb
def path(params={})
      rep_name = params[:rep] || :default

      # Get rep
      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 path
      rep.path
    end
# Returns the path from a given representation. This is a convenience
# method that makes fetching the path of a rep easier.
#
# @option params [String] :rep (:default) The name of the representation
#   from which the path should be fetched. By default, the path will be
#   fetched from the default representation.
#
# @return [String] The path of the given rep ( or the default rep if no
#   rep is specified)
Returns the path from a given representation. This is a convenience
method that makes fetching the path of a rep easier.
Returns the path from a given representation . This is a convenience method that makes fetching the path of a rep easier .
def path(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 path
      rep.path
    end
def path ( 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 . path end
Returns the path from a given representation.
Returns the path from a given representation .
# Get rep # Get rep's path
The path of the given rep ( or the default rep if no rep is specified)
The path of the given rep ( or the default rep if no rep is specified )
String
params
:rep (:default) The name of the representation from which the path should be fetched. By default, the path will be fetched from the default representation.
: rep ( : default ) The name of the representation from which the path should be fetched . By default the path will be fetched from the default representation .