Method: Docks::Helpers::Path#pattern_path

Defined in:
lib/docks/helpers/path_helper.rb

#pattern_path(pattern, options = {}) ⇒ Object



77
78
79
80
81
82
83
84
# File 'lib/docks/helpers/path_helper.rb', line 77

def pattern_path(pattern, options = {})
  pattern = pattern.name if pattern.kind_of?(Containers::Pattern)

  file = "index.html"
  file << "##{options[:anchor]}" if options.fetch(:anchor, false)

  Docks.config.destination + File.join(Docks.config.mount_at, pattern.to_s, file)
end