Method: Faker::Internet.url
- Defined in:
- lib/faker/default/internet.rb
.url(legacy_host = NOT_GIVEN, legacy_path = NOT_GIVEN, legacy_scheme = NOT_GIVEN, host: domain_name, path: "/#{username}", scheme: 'http') ⇒ String
Returns URL
455 456 457 458 459 460 461 462 463 |
# File 'lib/faker/default/internet.rb', line 455 def url(legacy_host = NOT_GIVEN, legacy_path = NOT_GIVEN, legacy_scheme = NOT_GIVEN, host: domain_name, path: "/#{username}", scheme: 'http') warn_for_deprecated_arguments do |keywords| keywords << :host if legacy_host != NOT_GIVEN keywords << :path if legacy_path != NOT_GIVEN keywords << :scheme if legacy_scheme != NOT_GIVEN end "#{scheme}://#{host}#{path}" end |