class Prez::New
Private Class Methods
source_root()
click to toggle source
# File lib/prez/new.rb, line 30 def source_root File.absolute_path File.expand_path("../../../templates", __FILE__) end
Public Instance Methods
check_file!()
click to toggle source
# File lib/prez/new.rb, line 9 def check_file! if File.exists? filename raise Prez::Error.new("There is already a presentation file named '#{filename}'") end end
generate_prez()
click to toggle source
# File lib/prez/new.rb, line 15 def generate_prez template "new.prez.tt", "#{name}.prez" end
Private Instance Methods
filename()
click to toggle source
# File lib/prez/new.rb, line 21 def filename if name =~ /\.prez$/ name else "#{name}.prez" end end