Class: Taza::Options
- Inherits:
-
UserChoices::Command
- Object
- UserChoices::Command
- Taza::Options
- Includes:
- UserChoices
- Defined in:
- lib/taza/options.rb
Instance Method Summary collapse
Instance Method Details
#add_choices(builder) ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/taza/options.rb', line 12 def add_choices(builder) builder.add_choice(:browser, :type=>:string, :default=>'firefox') builder.add_choice(:driver, :type=>:string, :default=>'selenium') builder.add_choice(:attach, :type=>:boolean, :default=>false) builder.add_choice(:timeout, :type=>:string) builder.add_choice(:server_ip, :type=>:string) builder.add_choice(:server_port, :type=>:string) end |
#add_sources(builder) ⇒ Object
6 7 8 9 10 |
# File 'lib/taza/options.rb', line 6 def add_sources(builder) # builder.add_source(CommandLineSource, :usage, "Usage: ruby #{$0} [options] file1 [file2]") builder.add_source(EnvironmentSource, :mapping, {:browser => 'BROWSER', :driver => 'DRIVER', :attach => 'ATTACH', :timeout => 'TIMEOUT', :server_ip => 'SERVER_IP', :server_port => 'SERVER_PORT'}) builder.add_source(YamlConfigFileSource, :from_complete_path, Settings.config_file_path) end |
#execute ⇒ Object
21 22 23 |
# File 'lib/taza/options.rb', line 21 def execute @user_choices end |