Class: UtilityCommands

Inherits:
Thor
  • Object
show all
Defined in:
lib/commands/utility_commands.rb

Direct Known Subclasses

ScaffoldingCommands

Instance Method Summary collapse

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
  browser_options(options[:opts]) if options[:opts] || options[:delete]
end

#browser_options(*opts) ⇒ Object



47
48
49
50
# File 'lib/commands/utility_commands.rb', line 47

def browser_options(*opts)
  Utilities.new.browser_options = opts unless opts.empty?
  Utilities.new.delete_browser_options if options[:delete]
end

#path(default_path) ⇒ Object



15
16
17
18
# File 'lib/commands/utility_commands.rb', line 15

def path(default_path)
  type = options.empty? ? 'page' : options.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

#raidObject



60
61
62
63
64
65
66
# File 'lib/commands/utility_commands.rb', line 60

def raid
  if options[:parallel]
    Utilities.new.parallel_run(options[:opts])
  else
    Utilities.new.run(options[: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