Module: VSphereCloud::ObjectStringifier::ClassMethods
- Defined in:
- lib/cloud/vsphere/object_stringifier.rb
Instance Method Summary collapse
Instance Method Details
#stringify_with(*attributes) ⇒ Object
8 9 10 11 12 |
# File 'lib/cloud/vsphere/object_stringifier.rb', line 8 def stringify_with(*attributes) define_method(:to_s) do "(#{self.class.name} (#{attributes.map{|attr| "#{attr}=\"#{self.send(attr)}\""}.join(', ')}))" end end |