Class: Twilio::REST::AuthStrategy

Inherits:
Object
  • Object
show all
Defined in:
lib/twilio-ruby/auth_strategy/auth_strategy.rb

Direct Known Subclasses

NoAuthStrategy, TokenAuthStrategy

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(auth_type) ⇒ AuthStrategy

Returns a new instance of AuthStrategy.



6
7
8
# File 'lib/twilio-ruby/auth_strategy/auth_strategy.rb', line 6

def initialize(auth_type)
  @auth_type = auth_type
end

Instance Attribute Details

#auth_type ⇒ Object

Returns the value of attribute auth_type.



4
5
6
# File 'lib/twilio-ruby/auth_strategy/auth_strategy.rb', line 4

def auth_type
  @auth_type
end

Instance Method Details

#auth_string ⇒ Object

Raises:

  • (NotImplementedError)


10
11
12
# File 'lib/twilio-ruby/auth_strategy/auth_strategy.rb', line 10

def auth_string
  raise NotImplementedError, 'Subclasses must implement this method'
end

#requires_authentication ⇒ Object

Raises:

  • (NotImplementedError)


14
15
16
# File 'lib/twilio-ruby/auth_strategy/auth_strategy.rb', line 14

def requires_authentication
  raise NotImplementedError, 'Subclasses must implement this method'
end