class Blogster::Template
Attributes
path[R]
Public Class Methods
new(path, name)
click to toggle source
# File lib/blogster/templates.rb, line 29 def initialize(path, name) @path = path @name = name end
Public Instance Methods
==(other)
click to toggle source
# File lib/blogster/templates.rb, line 46 def ==(other) name == other.name && path == other.path end
file()
click to toggle source
# File lib/blogster/templates.rb, line 34 def file File.read(fullpath) end
fullpath()
click to toggle source
# File lib/blogster/templates.rb, line 38 def fullpath File.join(path, @name) end
name()
click to toggle source
# File lib/blogster/templates.rb, line 42 def name @suffixless_name ||= @name.gsub('.md', '') end