class Primo::Creator
Public Class Methods
new(template_name)
click to toggle source
# File lib/primo/creator.rb, line 4 def initialize template_name @template_name = template_name end
Public Instance Methods
create(name)
click to toggle source
# File lib/primo/creator.rb, line 8 def create name template.remote.ensure_cloned system "rails new #{name} -m #{template.expanded_filename}" end
template()
click to toggle source
# File lib/primo/creator.rb, line 13 def template raise ArgumentError, "No such template found (#{@template_name})" unless Primo::Template.exists? @template_name @template ||= Primo::Template.for(@template_name) end