Sha256: 2e5d854b8a39ff705f0e55e5a08b1cff1d2a920514dba8549805f42ed381dfe3

Contents?: true

Size: 656 Bytes

Versions: 50

Compression:

Stored size: 656 Bytes

Contents

module ACTV
  module Configurable

    # Convenience method to allow configuration options to be set in a block
    def configure
      yield self
      self
    end

    CONFIG_KEYS = [
      :connection_options,
      :endpoint,
      :media_endpoint,
      :middleware,
      :search_endpoint,
      :api_key
    ] unless defined? CONFIG_KEYS

    attr_accessor *CONFIG_KEYS

    AUTH_KEYS = [
      :consumer_key,
      :consumer_secret,
      :oauth_token,
      :oauth_token_secret,
    ] unless defined? AUTH_KEYS

    attr_writer *AUTH_KEYS

    class << self

      def keys
        @keys ||= CONFIG_KEYS + AUTH_KEYS
      end

    end

  end
end

Version data entries

50 entries across 50 versions & 1 rubygems

Version Path
actv-1.3.2 lib/actv/configurable.rb
actv-1.3.0 lib/actv/configurable.rb
actv-1.2.0 lib/actv/configurable.rb
actv-1.1.23 lib/actv/configurable.rb
actv-1.1.17 lib/actv/configurable.rb
actv-1.1.6 lib/actv/configurable.rb
actv-1.1.5 lib/actv/configurable.rb
actv-1.1.3 lib/actv/configurable.rb
actv-1.1.1 lib/actv/configurable.rb
actv-1.1.0 lib/actv/configurable.rb