Class: Auth
- Inherits:
-
Object
- Object
- Auth
- Defined in:
- lib/oos4ruby/auth.rb
Instance Method Summary collapse
- #add_to(req) ⇒ Object
-
#initialize(username, password, method) ⇒ Auth
constructor
A new instance of Auth.
- #method?(method) ⇒ Boolean
Constructor Details
#initialize(username, password, method) ⇒ Auth
Returns a new instance of Auth.
6 7 8 9 10 |
# File 'lib/oos4ruby/auth.rb', line 6 def initialize(username, password, method) @username = username @password = password @method = method end |
Instance Method Details
#add_to(req) ⇒ Object
12 13 14 15 |
# File 'lib/oos4ruby/auth.rb', line 12 def add_to(req) wsse(req) if method?:wsse app(req) if method?:app end |
#method?(method) ⇒ Boolean
17 18 19 |
# File 'lib/oos4ruby/auth.rb', line 17 def method?(method) @method == method end |