Class: ProjectInstaller
- Inherits:
-
Thor
- Object
- Thor
- ProjectInstaller
- Defined in:
- lib/ptinstaller.rb
Instance Method Summary collapse
-
#initialize(*args) ⇒ ProjectInstaller
constructor
A new instance of ProjectInstaller.
- #install ⇒ Object
Constructor Details
#initialize(*args) ⇒ ProjectInstaller
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/ptinstaller.rb', line 6 def initialize(*args) @current_dir = Pathname.pwd Dir.foreach(@current_dir) do |filename| if filename.include? 'xcodeproj' project_path = "#{@current_dir}/#{filename}" @project_name = File.basename(filename) @project = Xcodeproj::Project.open project_path break end end super(*args) end |
Instance Method Details
#install ⇒ Object
21 22 23 24 25 26 |
# File 'lib/ptinstaller.rb', line 21 def install downloadFile source_group = @project.main_group.children[0] add_all_to_group "#{@current_dir}/Source", source_group @project.save end |