module Filepreviews::Config

@author Jonah Ruiz <jonah@pixelhipsters.com> Configurable module for API key and options

Attributes

api_key[RW]

@!attribute api_key, :secret_key @return [String] API/Secret key to be used

secret_key[RW]

@!attribute api_key, :secret_key @return [String] API/Secret key to be used

Public Class Methods

included(base) click to toggle source
# File lib/filepreviews/config.rb, line 5
def self.included(base)
  base.extend(self)
end

Public Instance Methods

configure() { |self| ... } click to toggle source

Configures api_key and options

Usage example:
  Filepreviews.configure do |config|
    config.api_key = 'your_api_key_here'
    config.secret_key = 'your_api_key_here'
  end

Alternate way:
  Filepreviews.api_key = ENV['YOUR_API_KEY']
  Filepreviews.secret_key = ENV['YOUR_SECRET_KEY']

@param <api_key> [String] api/secret key to use

# File lib/filepreviews/config.rb, line 25
def configure
  yield self if block_given?
end