Class: RestMan::Request::Init::Url

Inherits:
ActiveMethod::Base
  • Object
show all
Defined in:
lib/restman/request/init/url.rb,
lib/restman/request/init/url/normalize_url.rb,
lib/restman/request/init/url/add_query_from_headers.rb

Defined Under Namespace

Classes: AddQueryFromHeaders, NormalizeUrl

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#url=(value) ⇒ Object

Sets the attribute url

Parameters:

  • value

    the value to set the attribute url to.



12
13
14
# File 'lib/restman/request/init/url.rb', line 12

def url=(value)
  @url = value
end

Instance Method Details

#callObject

Raises:

  • (ArgumentError)


14
15
16
17
18
19
20
21
# File 'lib/restman/request/init/url.rb', line 14

def call
  raise ArgumentError, "must pass :url" unless url

  add_http_scheme
  add_query_from_headers

  url
end