Module: Vagabond

Defined in:
lib/vagabond/knife.rb,
lib/vagabond/config.rb,
lib/vagabond/server.rb,
lib/vagabond/helpers.rb,
lib/vagabond/version.rb,
lib/vagabond/commands.rb,
lib/vagabond/vagabond.rb,
lib/vagabond/actions/up.rb,
lib/vagabond/actions/ssh.rb,
lib/vagabond/actions/thaw.rb,
lib/vagabond/vagabondfile.rb,
lib/vagabond/actions/start.rb,
lib/vagabond/actions/create.rb,
lib/vagabond/actions/freeze.rb,
lib/vagabond/actions/status.rb,
lib/vagabond/actions/destroy.rb,
lib/vagabond/actions/rebuild.rb,
lib/vagabond/actions/provision.rb,
lib/vagabond/internal_configuration.rb,
lib/vagabond/cookbooks/vagabond/libraries/vagabond.rb

Defined Under Namespace

Modules: Actions, Helpers Classes: Commands, Config, InternalConfiguration, Knife, Server, Vagabond, Vagabondfile, Version

Constant Summary collapse

VERSION =
Version.new('0.1.2', 'bindle')

Class Method Summary collapse

Class Method Details

.get_bytes(s) ⇒ Object



3
4
5
6
7
8
# File 'lib/vagabond/cookbooks/vagabond/libraries/vagabond.rb', line 3

def get_bytes(s)
  s = s.to_s
  indx = [nil, 'k', 'm', 'g']
  power = indx.index(s.slice(-1, s.length).to_s.downcase).to_i * 10
  (2**power) * s.to_i
end