Sha256: 8955251a913a1b138374df85b93a4dc3833eff9cb14757f398385603217e111e

Contents?: true

Size: 227 Bytes

Versions: 11

Compression:

Stored size: 227 Bytes

Contents

# frozen_string_literal: true

class FalseClass

  def to_bool
    self
  end

  alias to_b to_bool

  def to_i
    0
  end

end

class TrueClass

  def to_bool
    self
  end

  alias to_b to_bool

  def to_i
    1
  end

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
lite-ruby-1.0.14 lib/lite/ruby/boolean.rb
lite-ruby-1.0.13 lib/lite/ruby/boolean.rb
lite-ruby-1.0.12 lib/lite/ruby/boolean.rb
lite-ruby-1.0.11 lib/lite/ruby/boolean.rb
lite-ruby-1.0.10 lib/lite/ruby/boolean.rb
lite-ruby-1.0.9 lib/lite/ruby/boolean.rb
lite-ruby-1.0.8 lib/lite/ruby/boolean.rb
lite-ruby-1.0.7 lib/lite/ruby/boolean.rb
lite-ruby-1.0.6 lib/lite/ruby/boolean.rb
lite-ruby-1.0.5 lib/lite/ruby/boolean.rb
lite-ruby-1.0.4 lib/lite/ruby/boolean.rb