class Ruboty::Docker::Actions::Base
Constants
- NAMESPACE
Attributes
message[R]
Public Class Methods
new(message)
click to toggle source
# File lib/ruboty/docker/actions/base.rb, line 9 def initialize(message) @message = message end
Private Instance Methods
filesize_to_human(n)
click to toggle source
# File lib/ruboty/docker/actions/base.rb, line 15 def filesize_to_human(n) count = 0 while n >= 1000 and count < 4 n /= 1000.0 count += 1 end format('%.2f', n) + %w(B KB MB GB TB)[count] end