Class: UtilityCommands
- Inherits:
-
Thor
- Object
- Thor
- UtilityCommands
- Defined in:
- lib/commands/utility_commands.rb
Instance Method Summary collapse
- #browser(default_browser = nil) ⇒ Object
- #browser_options(*opts) ⇒ Object
- #builds(build_type) ⇒ Object
- #path(default_path) ⇒ Object
- #platform(platform) ⇒ Object
- #raid ⇒ Object
- #url(default_url) ⇒ Object
Instance Method Details
#browser(default_browser = nil) ⇒ Object
32 33 34 35 |
# File 'lib/commands/utility_commands.rb', line 32 def browser(default_browser = nil) Utilities.browser = default_browser if default_browser ([:opts]) if [:opts] || [:delete] end |
#browser_options(*opts) ⇒ Object
41 42 43 44 |
# File 'lib/commands/utility_commands.rb', line 41 def (*opts) Utilities. = opts unless opts.empty? Utilities. if [:delete] end |
#builds(build_type) ⇒ Object
73 74 75 76 77 |
# File 'lib/commands/utility_commands.rb', line 73 def builds(build_type) raise 'Please select one of the following build types: android, ios, both' unless %w[android ios both].include?(build_type) Utilities.download_builds build_type end |
#path(default_path) ⇒ Object
15 16 17 18 |
# File 'lib/commands/utility_commands.rb', line 15 def path(default_path) type = .empty? ? 'page' : .keys.first Utilities.send("#{type}_path=", default_path) end |
#platform(platform) ⇒ Object
68 69 70 |
# File 'lib/commands/utility_commands.rb', line 68 def platform(platform) Utilities.platform = platform end |
#raid ⇒ Object
52 53 54 55 56 57 58 |
# File 'lib/commands/utility_commands.rb', line 52 def raid if [:parallel] Utilities.parallel_run([:opts]) else Utilities.run([:opts]) end end |
#url(default_url) ⇒ Object
22 23 24 |
# File 'lib/commands/utility_commands.rb', line 22 def url(default_url) Utilities.url = default_url end |