Class: Jeff::Request

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

Overview

Signs an AWS request.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#hostObject

Returns the value of attribute host

Returns:

  • (Object)

    the current value of host



32
33
34
# File 'lib/jeff.rb', line 32

def host
  @host
end

#methodObject

Returns the value of attribute method

Returns:

  • (Object)

    the current value of method



32
33
34
# File 'lib/jeff.rb', line 32

def method
  @method
end

#pathObject

Returns the value of attribute path

Returns:

  • (Object)

    the current value of path



32
33
34
# File 'lib/jeff.rb', line 32

def path
  @path
end

#query_stringObject

Returns the value of attribute query_string

Returns:

  • (Object)

    the current value of query_string



32
33
34
# File 'lib/jeff.rb', line 32

def query_string
  @query_string
end

Instance Method Details

#sign(aws_secret_access_key) ⇒ Object



33
34
35
# File 'lib/jeff.rb', line 33

def sign(aws_secret_access_key)
  Signature.new(aws_secret_access_key).sign(string_to_sign)
end

#string_to_signObject



37
38
39
# File 'lib/jeff.rb', line 37

def string_to_sign
  [method, host, path, query_string].join("\n")
end