Sha256: 028c69bf39c1d67fcf0e889ee068bc54e2d8568c8d6271a95063d2707ff1e8cb

Contents?: true

Size: 559 Bytes

Versions: 6

Compression:

Stored size: 559 Bytes

Contents

# frozen_string_literal: true

require_relative "snowpack/version"

module Snowpack
  @_mutex = Mutex.new

  def self.application
    @_mutex.synchronize do
      raise "Snowpack.application not configured" unless defined?(@_application)

      @_application
    end
  end

  def self.application?
    defined?(@_application) && @_application
  end

  def self.application=(klass)
    @_mutex.synchronize do
      raise "Snowpack.application already configured" if defined?(@_application)

      @_application = klass unless klass.name.nil?
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
snowpack-1.0.0.alpha7 lib/snowpack.rb
snowpack-1.0.0.alpha6 lib/snowpack.rb
snowpack-1.0.0.alpha5 lib/snowpack.rb
snowpack-1.0.0.alpha4 lib/snowpack.rb
snowpack-1.0.0.alpha3 lib/snowpack.rb
snowpack-1.0.0.alpha2 lib/snowpack.rb