Class: AmazonFPS::Credentials
- Inherits:
-
Object
- Object
- AmazonFPS::Credentials
- Defined in:
- lib/aws_credentials.rb
Overview
Sets up the credentials for the AmazonFPS session
Instance Attribute Summary collapse
-
#handlers ⇒ Object
readonly
Returns the value of attribute handlers.
Instance Method Summary collapse
-
#initialize(credentials) ⇒ Credentials
constructor
Load the credentials from the credentials Hash.
- #setHeader(header, value) ⇒ Object
Constructor Details
#initialize(credentials) ⇒ Credentials
Load the credentials from the credentials Hash
25 26 27 28 29 30 |
# File 'lib/aws_credentials.rb', line 25 def initialize(credentials) @handlers = Array.new credentials.each_pair do |key, value| @handlers << HeaderHandler.new(key, value) end end |
Instance Attribute Details
#handlers ⇒ Object (readonly)
Returns the value of attribute handlers.
22 23 24 |
# File 'lib/aws_credentials.rb', line 22 def handlers @handlers end |
Instance Method Details
#setHeader(header, value) ⇒ Object
32 33 34 35 36 37 38 |
# File 'lib/aws_credentials.rb', line 32 def setHeader(header, value) handlers.each do |handler| if handler.tag == header then handler.value = value end end end |