Sha256: 48c83e5f3291baed5bf3745164d9c693b57fa5fed29ddf9dfdbba023e99e03ba
Contents?: true
Size: 554 Bytes
Versions: 3
Compression:
Stored size: 554 Bytes
Contents
require "active_support/core_ext/string/inflections" require "great_pretender/config" module GreatPretender class Mockup attr_accessor :layout, :slug, :template alias :to_param :slug def initialize(path) @file = Pathname.new(path) end def name return @name if defined? @name name = slug.split('/').map { |s| s.titleize }.join(GreatPretender.config.path_separator) if slug =~ /^_/ name << ' (partial)' end @name = name end def updated_at @file.mtime end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
great_pretender-0.1.1 | lib/great_pretender/mockup.rb |
great_pretender-0.0.2 | lib/great_pretender/mockup.rb |
great_pretender-0.0.1 | lib/great_pretender/mockup.rb |