Class: XSpree::Create
- Inherits:
-
Object
- Object
- XSpree::Create
- Defined in:
- lib/create.rb
Instance Attribute Summary collapse
-
#project_path ⇒ Object
Returns the value of attribute project_path.
Class Method Summary collapse
Instance Method Summary collapse
- #create_project! ⇒ Object
-
#initialize(project_path) ⇒ Create
constructor
A new instance of Create.
Constructor Details
#initialize(project_path) ⇒ Create
Returns a new instance of Create.
15 16 17 18 19 |
# File 'lib/create.rb', line 15 def initialize(project_path) self.project_path = project_path validate_project_path validate_project_name end |
Instance Attribute Details
#project_path ⇒ Object
Returns the value of attribute project_path.
8 9 10 |
# File 'lib/create.rb', line 8 def project_path @project_path end |
Class Method Details
.run!(project_path) ⇒ Object
10 11 12 13 |
# File 'lib/create.rb', line 10 def self.run!(project_path) creator = self.new(project_path) creator.create_project! end |
Instance Method Details
#create_project! ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'lib/create.rb', line 21 def create_project! exec(<<-COMMAND) rails new #{project_path} \ --template=#{template} \ --skip-test-unit \ --skip-prototype COMMAND end |