Sha256: 6d854129e4cff38993873c892c30c939b5863bd7783d79d28e95ea64b62eba92

Contents?: true

Size: 456 Bytes

Versions: 6

Compression:

Stored size: 456 Bytes

Contents

module LifenFhir
  class Configuration

    attr_accessor :site, :application_access_token, :proxy_url

    def site=(url)
      if !/(.*)\/$/.match(url)
        raise LifenFhir::Error, "Invalid 'site' provided in configuration: '#{url}', a trailing slash is missing"
      end

      @site = url
    end
  end

  def self.configuration
    @configuration ||= Configuration.new
  end

  def self.configure
    yield(configuration) if block_given?
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
lifen_fhir-0.4.2 lib/lifen_fhir/configuration.rb
lifen_fhir-0.4.1 lib/lifen_fhir/configuration.rb
lifen_fhir-0.4.0 lib/lifen_fhir/configuration.rb
lifen_fhir-0.3.0 lib/lifen_fhir/configuration.rb
lifen_fhir-0.2.0 lib/lifen_fhir/configuration.rb
lifen_fhir-0.1.1 lib/lifen_fhir/configuration.rb