Sha256: 6b744834dfa22c7135c164c66bcf2e42692845389a822aa5602bbf06d57df8a3

Contents?: true

Size: 773 Bytes

Versions: 2

Compression:

Stored size: 773 Bytes

Contents

require 'virtus'

require 'plaza/configuration'
require "plaza/version"
require 'plaza/models'
require 'plaza/request'
require 'plaza/response'
require 'plaza/adapters'
require 'plaza/inflector'
require 'plaza/connection'

module Plaza

  def self.configuration(component_name = :default)
    @configurations ||= {}
    @configurations[component_name] ||= Plaza::Configuration.new
  end

  def self.configure(component_name = :default, &block)
    self.configuration(component_name).instance_eval(&block) if block_given?
  end

  def self.connection(component_name = :default)
    @connections ||= {}
    @connections[component_name] ||= Plaza::Connection.for(component_name)
  end

  def self.adapter(class_name)
    Plaza.const_get("#{class_name}Adapter").new
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
plaza-0.1.1 lib/plaza.rb
plaza-0.1.0 lib/plaza.rb