Class: Hash

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby-xen.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#to_argsObject

Converts a Hash into an array of key=val formatted strings

puts { :nics => 2, :vcpus => 1, :memory => 64 }.to_args

produces:

“memory=64”, “nics=2”, “vcpus=1”


49
50
51
# File 'lib/ruby-xen.rb', line 49

def to_args
  collect{|k,v| "#{k}=#{v}"}
end