Sha256: fc9996ecfa007632aea2ab9d9ec6af15d3fc41f522a34af3a7aa2055c8540235

Contents?: true

Size: 477 Bytes

Versions: 1

Compression:

Stored size: 477 Bytes

Contents

require "times_books/version"
require "times_books/request"
require "times_books/client"

module TimesBooks
  class << self
    attr_accessor :options
  end
  
  self.options = {}
  
  def self.new(params = {})
     TimesBooks::Client.new(params)
  end
  
  def self.configure(params = {})
    fail(ArgumentError, "Options hash required.") unless params.is_a?(Hash)

    options[:api_key]    = params[:api_key]
    options
  end

  def self.configuration
    options
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
times_books-0.1.0 lib/times_books.rb