Sha256: 4cca16fc6e96424560596a028b20bec1fc987c0f8aca596ff24a6bd247ffc960

Contents?: true

Size: 440 Bytes

Versions: 10

Compression:

Stored size: 440 Bytes

Contents

module Bitly
  module Config

    # bitly client options
    OPTION_KEYS = [
      :login,
      :api_key,
      :api_version,
      :timeout
    ]

    attr_accessor *OPTION_KEYS

    alias_method :access_token, :login
    alias_method :access_token=, :login=

    def configure
      yield self
      self
    end

    def options
      options = {}
      OPTION_KEYS.each{|key| options[key] = send(key)}
      options
    end

  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
bitly-1.1.1 lib/bitly/config.rb
bitly-1.1.0 lib/bitly/config.rb
bitly-1.0.2 lib/bitly/config.rb
bitly-1.0.1 lib/bitly/config.rb
bitly-1.0.0 lib/bitly/config.rb
bitly-0.10.4 lib/bitly/config.rb
bitly-0.10.3 lib/bitly/config.rb
bitly-0.10.2 lib/bitly/config.rb
bitly-0.10.1 lib/bitly/config.rb
bitly-0.10.0 lib/bitly/config.rb