Class: Hash
- Inherits:
-
Object
- Object
- Hash
- Defined in:
- lib/ruby-xen.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#to_args ⇒ Object
Converts a Hash into an array of key=val formatted strings.
Instance Method Details
#to_args ⇒ Object
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 |