Sha256: 2dc46189fac58429ad8a44508037fd432c91bca721022414e9b6b25478b0cc5b

Contents?: true

Size: 457 Bytes

Versions: 3

Compression:

Stored size: 457 Bytes

Contents

module Enumerable
  def with_fortschritt(**opts)
    Fortschritt.init(size, **opts)
    self
  end
end

class Object
  def fortschritt
    Fortschritt.increment
    self
  end
end

if defined?(Rails)
  module Fortschritt::ActiveRecordExtension

    extend ActiveSupport::Concern

    def with_fortschritt(**opts)
      Fortschritt.init(size, **opts)
      self
    end
  end

  ActiveRecord::Relation.send(:include, Fortschritt::ActiveRecordExtension)
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
fortschritt-1.0.1 lib/fortschritt/enumerable.rb
fortschritt-1.0.0 lib/fortschritt/enumerable.rb
fortschritt-0.3.6 lib/fortschritt/enumerable.rb