Class: Integer

Inherits:
Object
  • Object
show all
Defined in:
lib/utiles_integer.rb

Overview

Extentions for Integer class.

Instance Method Summary collapse

Instance Method Details

#is_blank?Boolean

Checks if it is blank.

Returns:

  • (Boolean)

    always false



14
15
16
# File 'lib/utiles_integer.rb', line 14

def is_blank?
  false
end

#noe?Boolean

Checks if it is nil or empty.

Returns:

  • (Boolean)

    always false



7
8
9
# File 'lib/utiles_integer.rb', line 7

def noe?
  false
end

#to_data_volString

Formats integer to data volume.

Examples:

18539311.to_date_vol => "185 MB"
18532.to_date_vol => "18,5 kB"

Returns:



24
25
26
# File 'lib/utiles_integer.rb', line 24

def to_data_vol
  to_s.to_data_vol
end