Class: Applyrics::Setup
- Inherits:
-
Object
- Object
- Applyrics::Setup
- Defined in:
- lib/applyrics/setup.rb
Instance Method Summary collapse
Instance Method Details
#is_android? ⇒ Boolean
31 32 33 |
# File 'lib/applyrics/setup.rb', line 31 def is_android? Dir["*.gradle"].count > 0 end |
#is_ios? ⇒ Boolean
27 28 29 |
# File 'lib/applyrics/setup.rb', line 27 def is_ios? (Dir["*.xcodeproj"] + Dir["*.xcworkspace"]).count > 0 end |
#is_unity? ⇒ Boolean
35 36 37 |
# File 'lib/applyrics/setup.rb', line 35 def is_unity? false end |
#run(config = {}) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/applyrics/setup.rb', line 7 def run(config = {}) platform = nil if is_ios? puts "Found iOS project..." platform = :ios elsif is_android? puts "Found Android project..." platform = :android elsif is_unity? puts "Found Unity project..." platform = :unity else puts "Didn't find any project!" return end Applyrics::Lyricsfile.generate(config) Applyrics::Project.new(platform) end |