Sha256: 885d5e62a674d1088dc8b975ceb94d7c48337d4f553d82ae77b4c5108dc8335e
Contents?: true
Size: 698 Bytes
Versions: 2
Compression:
Stored size: 698 Bytes
Contents
module Amiba module Source class Feed include Amiba::Source attr_accessor :type, :name def initialize(fn) self.name, self.type = File.basename(fn, ".builder").split(".") end def filename @filename ||= File.join("feeds", "#{@name}.#{@type}.builder") end def content=(c) @content ||= self.new? ? c : File.read(filename) end def staged_filename File.join(Amiba::Configuration.staged_dir, filename) end def output_filename File.join(Amiba::Configuration.site_dir, "public/#{name}.#{type}") end def link URI.escape "/#{name}.#{type}" end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
amiba-0.0.3 | lib/amiba/source/feed.rb |
amiba-0.0.2 | lib/amiba/source/feed.rb |