Sha256: 21fcc024bfff3d315ff0653d61a98ac1957752743aa2129570831c9e9a162291
Contents?: true
Size: 519 Bytes
Versions: 2
Compression:
Stored size: 519 Bytes
Contents
module Rails module Brochure class HomeContent #TODO: replace with cattr_accessor: HOME_FOLDER_PATH = "app/views/home/" def self.newest HomeContent.files.map { |f| File.new(f) }.sort { |a,b| a.ctime <=> b.ctime }.map { |f| f.ctime }.last end def self.files Dir.glob("#{HOME_FOLDER_PATH}**/*.html.*") end def self.templates HomeContent.files.map do |f| f.gsub(/(#{HOME_FOLDER_PATH}|.html.\w+)/,"") end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rails-brochure-0.0.4 | lib/rails-brochure/home_content.rb |
rails-brochure-0.0.3 | lib/rails-brochure/home_content.rb |