Sha256: 0c3baef64c1641c5c4777e9b56fbfaabc3f233767cbea4bad8c49ab4cb7d3b34

Contents?: true

Size: 543 Bytes

Versions: 5

Compression:

Stored size: 543 Bytes

Contents

require "document_number/configuration"
require "document_number/has_document_number"
require "document_number/numerator"
require "document_number/document_number"

module DocumentNumber
  # Default prefix for number
  def self.prefix=(value)
    ::DocumentNumber.configuration.prefix = value
  end

  private

  def self.configuration
    @@configuration ||= ::DocumentNumber::Configuration.instance
  end

  def self.configure
    yield configuration
  end
end

ActiveSupport.on_load(:active_record) do
  include ::DocumentNumber::Model
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
document_number-0.10.0 lib/document_number.rb
document_number-0.9.6 lib/document_number.rb
document_number-0.9.5 lib/document_number.rb
document_number-0.9.4 lib/document_number.rb
document_number-0.9.3 lib/document_number.rb