Class: Bard::CLI::New

Inherits:
Command
  • Object
show all
Defined in:
lib/bard/cli/new.rb

Constant Summary collapse

RAILS_REQUIREMENT =
"~> 8.0.0"

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Command

desc, option, setup

Instance Attribute Details

#project_nameObject

Returns the value of attribute project_name.



17
18
19
# File 'lib/bard/cli/new.rb', line 17

def project_name
  @project_name
end

Instance Method Details

#new(project_name) ⇒ Object



7
8
9
10
11
12
13
14
15
# File 'lib/bard/cli/new.rb', line 7

def new project_name
  @project_name = project_name
  validate
  create_project
  push_to_github
  stage
  puts green("Project #{project_name} created!")
  puts "Please cd ../#{project_name}"
end