Sha256: 01bf051bfbc84b26712d4dcfae5653bd45476248b1f07279590a4cf6f4505439

Contents?: true

Size: 362 Bytes

Versions: 20

Compression:

Stored size: 362 Bytes

Contents

# frozen_string_literal: true

module PaidUp
  # Unlimited class: designed to output as 'Unlimited' for string, -1 for db,
  # or 999999999 for number.
  module Unlimited
    def self.initialize
      999_999_999
    end

    def self.to_i(format = :default)
      format == :db ? -1 : 999_999_999
    end

    def self.to_s
      :unlimited.l
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
paid_up-0.13.21 app/models/paid_up/unlimited.rb
paid_up-0.13.17 app/models/paid_up/unlimited.rb
paid_up-0.13.16 app/models/paid_up/unlimited.rb
paid_up-0.13.14 app/models/paid_up/unlimited.rb
paid_up-0.13.13 app/models/paid_up/unlimited.rb
paid_up-0.13.12 app/models/paid_up/unlimited.rb
paid_up-0.13.11 app/models/paid_up/unlimited.rb
paid_up-0.13.10 app/models/paid_up/unlimited.rb
paid_up-0.13.9 app/models/paid_up/unlimited.rb
paid_up-0.13.8 app/models/paid_up/unlimited.rb
paid_up-0.13.7 app/models/paid_up/unlimited.rb
paid_up-0.13.6 app/models/paid_up/unlimited.rb
paid_up-0.13.5 app/models/paid_up/unlimited.rb
paid_up-0.13.4 app/models/paid_up/unlimited.rb
paid_up-0.13.3 app/models/paid_up/unlimited.rb
paid_up-0.13.2 app/models/paid_up/unlimited.rb
paid_up-0.13.1 app/models/paid_up/unlimited.rb
paid_up-0.13.0 app/models/paid_up/unlimited.rb
paid_up-0.12.4 app/models/paid_up/unlimited.rb
paid_up-0.12.3 app/models/paid_up/unlimited.rb