class RubyRedtail::Authentication

Public Class Methods

new(authentication = {}) click to toggle source
# 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