Class: Ambient::ProjectCreation

Inherits:
Object
  • Object
show all
Defined in:
lib/ambient/project_creation.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path, name) ⇒ ProjectCreation

Returns a new instance of ProjectCreation.



6
7
8
9
10
# File 'lib/ambient/project_creation.rb', line 6

def initialize(path, name)
  @path = path
  @name = name.gsub(/\W/, "")
  check_name!
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/ambient/project_creation.rb', line 3

def name
  @name
end

#pathObject (readonly)

Returns the value of attribute path.



3
4
5
# File 'lib/ambient/project_creation.rb', line 3

def path
  @path
end

Instance Method Details

#create_ios_projectObject



12
13
14
15
16
17
18
19
20
# File 'lib/ambient/project_creation.rb', line 12

def create_ios_project
  check_already_exists!
  puts "# Setting up project..."
  copy_from_template
  rename_project_to_name
  find_and_replace_instances_of_template_to_name
  create_ambientfile
  run_ambientfile
end