Class: Authinator::EndPointListener

Inherits:
Object
  • Object
show all
Defined in:
lib/authinator/end_point_listener.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash = {}) ⇒ EndPointListener

Returns a new instance of EndPointListener.



5
6
7
8
9
10
# File 'lib/authinator/end_point_listener.rb', line 5

def initialize(hash = {})
  @provider = hash.delete :provider
  @auth_code = hash.delete :auth_code
  @options = hash
  @errors = []
end

Instance Attribute Details

#auth_codeObject (readonly)

Returns the value of attribute auth_code.



3
4
5
# File 'lib/authinator/end_point_listener.rb', line 3

def auth_code
  @auth_code
end

#errorsObject (readonly)

Returns the value of attribute errors.



3
4
5
# File 'lib/authinator/end_point_listener.rb', line 3

def errors
  @errors
end

#optionsObject (readonly)

Returns the value of attribute options.



3
4
5
# File 'lib/authinator/end_point_listener.rb', line 3

def options
  @options
end

#providerObject (readonly)

Returns the value of attribute provider.



3
4
5
# File 'lib/authinator/end_point_listener.rb', line 3

def provider
  @provider
end

Instance Method Details

#valid?Boolean

Returns:

  • (Boolean)


12
13
14
15
# File 'lib/authinator/end_point_listener.rb', line 12

def valid?
  validator_presence? &&
    validator_valid_provider?
end