Method: Nomad::Size#initialize

Defined in:
lib/nomad/size.rb

#initialize(b) ⇒ Size

Initialize accepts the numer of bits as an Integer or Float and builds the conversions around it.

Examples:

Size.new(1342902)

More human friendly

Size.new(3*Size::KILOBYTES) # 3 KB


77
78
79
# File 'lib/nomad/size.rb', line 77

def initialize(b)
  @b = Float(b || 0)
end