Sha256: 699250b0ba1a9a7dbc81e8da9982fe50b5b08ef101e9f5c4b9630aa32802ea47

Contents?: true

Size: 216 Bytes

Versions: 1

Compression:

Stored size: 216 Bytes

Contents

class Fixnum

  def nearest_half
    to_f.nearest_half
  end

  def to_bool
    return true if self == 1
    return false if self == 0
    raise ArgumentError.new("invalid value for Boolean: \"#{self}\"")
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
heartwood-0.0.1 lib/heartwood/support/fixnum.rb