Module: Ios3::CLI
- Defined in:
- lib/ios3/cli.rb
Defined Under Namespace
Modules: Options
Class Method Summary collapse
- .closest_ios3file(dir) ⇒ Object
-
.run(args) ⇒ Object
How the whole thing gets started.
Class Method Details
.closest_ios3file(dir) ⇒ Object
61 62 63 64 65 66 67 68 69 70 |
# File 'lib/ios3/cli.rb', line 61 def self.closest_ios3file(dir) file_name = File.join(dir, 'ios3file') if File.exists?(file_name) file_name elsif dir == '/' nil else closest_ios3file(File.(File.join(dir, '..'))) end end |
.run(args) ⇒ Object
How the whole thing gets started
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/ios3/cli.rb', line 40 def self.run(args) unless File.exist?('Rakefile') help! "Run on root directoy of RubyMotion project." end puts "HELP!!!" = Options.parse!(ARGV) puts ios3file = closest_ios3file(Dir.pwd) if (ios3file) Dir.chdir(File.dirname(ios3file)) ios3::DSL.load(ios3file, ) else # puts "Cannot find ios3file" say_error "Cannot find ios3file" end end |