Sha256: 1c1dde5d8128d3caba29ab0376fe209055e7bdb8de5ce543f079d27b8af3e0dc

Contents?: true

Size: 369 Bytes

Versions: 1

Compression:

Stored size: 369 Bytes

Contents

# -*- encoding: utf-8 -*-
# -*- frozen_string_literal: true -*-
# -*- warn_indent: true -*-

class TrueClass
  # Returns +1+ if invoked on +TrueClass+ instance.
  #
  # ==== Examples
  #
  #   true.to_i #=> 1
  def to_i
    1
  end

  # Returns +true+ if invoked on +TrueClass+ instance.
  #
  # ==== Examples
  #
  #   true.to_b #=> true
  def to_b
    true
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rb_core_extensions-0.1.3 lib/core_extensions/true_class.rb