Class: Auth

Inherits:
Object
  • Object
show all
Defined in:
lib/oos4ruby/auth.rb

Instance Method Summary collapse

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

Returns:

  • (Boolean)


17
18
19
# File 'lib/oos4ruby/auth.rb', line 17

def method?(method)
  @method == method
end