Class: UtilityCommands
- Inherits:
-
Thor
- Object
- Thor
- UtilityCommands
- Defined in:
- lib/commands/utility_commands.rb
Direct Known Subclasses
Instance Method Summary collapse
- #browser(default_browser = nil) ⇒ Object
- #browser_options(*opts) ⇒ Object
- #path(default_path) ⇒ Object
- #platform(platform) ⇒ Object
- #raid ⇒ Object
- #url(default_url) ⇒ Object
Instance Method Details
#browser(default_browser = nil) ⇒ Object
36 37 38 39 |
# File 'lib/commands/utility_commands.rb', line 36 def browser(default_browser = nil) Utilities.new.browser = default_browser if default_browser ([:opts]) if [:opts] || [:delete] end |
#browser_options(*opts) ⇒ Object
47 48 49 50 |
# File 'lib/commands/utility_commands.rb', line 47 def (*opts) Utilities.new. = opts unless opts.empty? Utilities.new. if [:delete] 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.new.send("#{type}_path=", default_path) end |
#platform(platform) ⇒ Object
78 79 80 |
# File 'lib/commands/utility_commands.rb', line 78 def platform(platform) Utilities.new.platform = platform end |
#raid ⇒ Object
60 61 62 63 64 65 66 |
# File 'lib/commands/utility_commands.rb', line 60 def raid if [:parallel] Utilities.new.parallel_run([:opts]) else Utilities.new.run([:opts]) end end |
#url(default_url) ⇒ Object
24 25 26 |
# File 'lib/commands/utility_commands.rb', line 24 def url(default_url) Utilities.new.url = default_url end |