class Wst::XmlPage

Public Class Methods

matcher() click to toggle source
# File lib/wst/page.rb, line 32
def self.matcher
  @@matcher
end
new(file_path) click to toggle source
Calls superclass method Wst::HamlContent::new
# File lib/wst/page.rb, line 18
def initialize file_path
  super file_path

  m, cats, slug, ext = *file_path.match(@@matcher)
  base_path = File.join(Configuration.config['path'], '_pages') + '/'
  @cats = cats.gsub(base_path, '').chomp('/') if !cats.nil? && cats != base_path
  @slug = slug
  @ext = ext
end

Public Instance Methods

content_url() click to toggle source
# File lib/wst/page.rb, line 28
def content_url
  "#{@cats + '/' if @cats != ''}#{CGI.escape @slug}.xml"
end