Sha256: 1f26df4a8f09d8ff123efdcaef56295e579e71525b15c705d266ac8021ad640c

Contents?: true

Size: 621 Bytes

Versions: 2

Compression:

Stored size: 621 Bytes

Contents

module Unsplash # :nodoc:
  class Configuration # :nodoc:
    attr_accessor :application_access_key
    attr_accessor :application_secret
    attr_accessor :application_redirect_uri
    attr_accessor :logger
    attr_accessor :utm_source
    attr_writer   :test

    def initialize
      @test = true
      @logger = Logger.new(STDOUT)
    end

    def test?
      !!@test
    end

    def application_id=(key)
      logger.warn "Configuring application_id is deprecated. Use application_access_key."
      self.application_access_key = key
    end

    def application_id
      application_access_key
    end

  end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
unsplash-1.5.6 lib/unsplash/configuration.rb
unsplash_mango-1.0.0 lib/unsplash/configuration.rb