Sha256: 174a1682b2968a714d979293208896fe0b370f441023d8af5aed3a4c080231e8

Contents?: true

Size: 468 Bytes

Versions: 9

Compression:

Stored size: 468 Bytes

Contents

module IMDB
  class Configuration
    class << self
      def caching=(caching)
        @caching = caching
      end
      
      def caching
        @caching
      end
      
      def db(param={})
        @db_hostname = param[:hostname]
        @db_name = param[:database]
        if @caching
          MongoMapper.connection = Mongo::Connection.new(@db_hostname)
          MongoMapper.database = @db_name
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
imdb-scan-0.0.3.1 lib/configuration.rb
imdb-scan-0.0.3 lib/configuration.rb
imdb-scan-0.0.2 lib/configuration.rb
imdb-scan-0.0.1 lib/configuration.rb
ruby-imdb-0.7.3 lib/configuration.rb
ruby-imdb-0.7.2 lib/configuration.rb
ruby-imdb-0.7.1 lib/configuration.rb
ruby-imdb-0.7.0 lib/configuration.rb
ruby-imdb-0.6.0 lib/configuration.rb