Sha256: 7ea2bcab7a63af08ac32c01daa1a768fedbfacbeaaeb2b4a71699b754e31fb75

Contents?: true

Size: 235 Bytes

Versions: 10

Compression:

Stored size: 235 Bytes

Contents

# frozen_string_literal: true

require 'bigdecimal'

FalseClass.class_eval do
  # @return [BigDecimal]
  def to_d
    BigDecimal('0')
  end
end

TrueClass.class_eval do
  # @return [BigDecimal]
  def to_d
    BigDecimal('1')
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
ruby-rails-extensions-2.1.1 lib/ruby-rails-extensions/extensions/to_d.rb
ruby-rails-extensions-2.1.0 lib/ruby-rails-extensions/extensions/to_d.rb
ruby-rails-extensions-2.1.0.pre.rc.14 lib/ruby-rails-extensions/extensions/to_d.rb
ruby-rails-extensions-2.1.0.pre.rc.13 lib/ruby-rails-extensions/extensions/to_d.rb
ruby-rails-extensions-2.1.0.pre.rc.12 lib/ruby-rails-extensions/extensions/to_d.rb
ruby-rails-extensions-2.1.0.pre.rc.11 lib/ruby-rails-extensions/extensions/to_d.rb
ruby-rails-extensions-2.1.0.pre.rc.10 lib/ruby-rails-extensions/extensions/to_d.rb
ruby-rails-extensions-2.1.0.pre.rc.9 lib/ruby-rails-extensions/extensions/to_d.rb
ruby-rails-extensions-2.1.0.pre.rc.8 lib/ruby-rails-extensions/extensions/to_d.rb
ruby-rails-extensions-2.1.0.pre.rc.7 lib/ruby-rails-extensions/extensions/to_d.rb