Class: RubyRedtail::Authentication
- Inherits:
-
Object
- Object
- RubyRedtail::Authentication
- Defined in:
- lib/ruby-redtail/authentication.rb
Instance Method Summary collapse
-
#initialize(authentication = {}) ⇒ Authentication
constructor
A new instance of Authentication.
Constructor Details
#initialize(authentication = {}) ⇒ Authentication
Returns a new instance of Authentication.
3 4 5 6 7 8 9 10 |
# File 'lib/ruby-redtail/authentication.rb', line 3 def initialize(authentication = {}) raise ArgumentError if authentication.class != Hash authentication.each do |key, value| key = key.underscore self.class.send :attr_accessor, key instance_variable_set "@#{key}", value end end |