module Chemlab

Chemlaboratory

Constants

VERSION

Public Class Methods

configuration(&block) click to toggle source

Returns the global [Chemlab::Configuration] object. While you can use this method to access the configuration, the more common convention is to use Chemlab.configure.

@example

Chemlab.configuration.something = 1234

@see Chemlab.configure

# File lib/chemlab.rb, line 27
def self.configuration(&block)
  @configuration ||= Chemlab::Configuration.new(&block)
end
configure() { |configuration(&block)| ... } click to toggle source

Yields the global configuration to a block. @yield [Configuration] global configuration

@example

Chemlab.configure do |config|
  config.base_url = 'https://example.com'
end
# File lib/chemlab.rb, line 16
def self.configure(&block)
  yield configuration(&block) if block_given?
end