Class: GenerateCommand

Inherits:
Object
  • Object
show all
Defined in:
lib/RubySelenium.rb

Class Method Summary collapse

Class Method Details

.parse(args) ⇒ Object



207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
# File 'lib/RubySelenium.rb', line 207

def self.parse(args)
   
    options = OpenStruct.new
    options.html_generate_location = GENERATE_LOCATION
    options.webservice_location = "http://localhost:2001"
   
    opts = OptionParser.new do |opts|
        opts.banner = "Usage: generate.rb [options]"

        opts.separator ""
        opts.separator "Specific options:"

        opts.on("-g", "--html_generate_location LOCATION", "Specify a location to generate the html tests") do |loc|
            options.html_generate_location = loc
        end

        opts.separator ""

        opts.on("-w", "--webservice_location LOCATION", "Specify a location to find the webservice") do |loc|
            options.webservice_location = loc
        end

        opts.separator ""
        opts.separator "Common options:"

        opts.on_tail("-h", "--help", "Show this message") do
            puts opts
            exit
        end

        opts.on_tail("-v", "--version", "Show version") do
            puts RUBY_SELENIUM_VERSION
            exit
        end
    end

opts.parse!(args)
options
end