Sha256: 56dd123f52b7415912b0e5ed42eb1268569726e4fd33fc127b421924bb9342a4
Contents?: true
Size: 486 Bytes
Versions: 5
Compression:
Stored size: 486 Bytes
Contents
require 'pathname' module Spontaneous class Revision attr_reader :revision, :site def initialize(revision, site) @revision = revision.to_i @site = site end def root ::File.join(site.revision_root, padded_revision) end def path(*path) path = path.flatten Pathname.new(File.join(root, *path.map(&:to_s))) end def padded_revision revision.to_s.rjust(5, "0") end def to_i @revision end end end
Version data entries
5 entries across 5 versions & 1 rubygems