class Railgen::Skeleton
Attributes
path[R]
Public Class Methods
new(path, base)
click to toggle source
# File lib/railgen/skeleton.rb, line 6 def initialize(path, base) @path = path @base = base end
Public Instance Methods
directory?()
click to toggle source
# File lib/railgen/skeleton.rb, line 15 def directory? File.directory?(@path) end
erb?()
click to toggle source
# File lib/railgen/skeleton.rb, line 19 def erb? File.extname(@path) == ".erb" end
read()
click to toggle source
# File lib/railgen/skeleton.rb, line 23 def read open(@path).read end
skeleton_path()
click to toggle source
# File lib/railgen/skeleton.rb, line 11 def skeleton_path @path.gsub("#{@base}/../../skeleton", '') end