Sha256: c92423a99976c5e19b9bbdaf8eb13b375878083f44f13606868e77dd4331a1eb

Contents?: true

Size: 482 Bytes

Versions: 5

Compression:

Stored size: 482 Bytes

Contents

require 'amiba/source'

module Amiba
  module Source
    class Partial
      include Amiba::Source

      attr_accessor :dir, :name
      def initialize(path)
        self.dir, self.name = File.split path
      end

      def filename 
        @filename ||= File.join("pages", @dir, "_#{@name}.haml")
      end

      def staged_filename
        File.join(Amiba::Configuration.staged_dir, filename)
      end
      alias_method :output_filename, :staged_filename

    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
amiba-0.0.8 lib/amiba/source/partial.rb
amiba-0.0.7 lib/amiba/source/partial.rb
amiba-0.0.6 lib/amiba/source/partial.rb
amiba-0.0.5 lib/amiba/source/partial.rb
amiba-0.0.4 lib/amiba/source/partial.rb