Sha256: e937fc6bacb6fee96425e1499ca63d0df558b4e91e65a6ecc6682a69549e5e62

Contents?: true

Size: 447 Bytes

Versions: 1

Compression:

Stored size: 447 Bytes

Contents

class Primo
  class Creator

    def initialize template_name
      @template_name = template_name
    end

    def create name
      template.remote.ensure_cloned
      system "rails new #{name} -m #{template.expanded_filename}"
    end

    def template
      raise ArgumentError, "No such template found (#{@template_name})" unless Primo::Template.exists? @template_name
      @template ||= Primo::Template.for(@template_name)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
primo-0.1.0 lib/primo/creator.rb