Module: Genny::URI

Defined in:
lib/genny/uri.rb

Class Method Summary collapse

Class Method Details

.genny(opts = {}) ⇒ Object

Parameters:

  • opts (Hash) (defaults to: {})

    Options for the generator

Options Hash (opts):

  • :host (String) — default: 'example.com'

    The host of the generated URI



8
9
10
11
# File 'lib/genny/uri.rb', line 8

def self.genny(opts = {})
  opts = Genny.symbolize(opts)
  ::URI::HTTP.build(host: opts[:host] || 'example.com', path: "/#{Genny::String.genny}")
end