Sha256: 069ed9347c8b6c269c55ef3cb2833985d8fa251fe998b7a26e3cf96cd77adc03

Contents?: true

Size: 535 Bytes

Versions: 10

Compression:

Stored size: 535 Bytes

Contents

module RubyRedtail
  class Client < RubyRedtail::Contact
    # http://help.redtailtechnology.com/entries/21654562-authentication-methods
    def initialize(client = {}, api_hash)
      @api_hash = api_hash
      
      raise ArgumentError unless client['ClientID']
      @id = client['ClientID']
      
      raise ArgumentError if client.class != Hash
      client.each do |key, value|
        key = key.underscore
        self.class.send :attr_accessor, key
        instance_variable_set "@#{key}", value
      end
    end

  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
ruby-redtail-0.3.8 lib/ruby-redtail/client.rb
ruby-redtail-0.3.7 lib/ruby-redtail/client.rb
ruby-redtail-0.3.6 lib/ruby-redtail/client.rb
ruby-redtail-0.3.5 lib/ruby-redtail/client.rb
ruby-redtail-0.3.4 lib/ruby-redtail/client.rb
ruby-redtail-0.3.3 lib/ruby-redtail/client.rb
ruby-redtail-0.3.2 lib/ruby-redtail/client.rb
ruby-redtail-0.3.1 lib/ruby-redtail/client.rb
ruby-redtail-0.3.0 lib/ruby-redtail/client.rb
ruby-redtail-0.2.0 lib/ruby-redtail/client.rb