Read more

Add a method to an existing object

Henning Koch
August 31, 2010Software engineer at makandra GmbH

Use the attached initializer to do stuff like this

str = "abc"
str.imbue(:foo => 'foo value', :bar => 'bar value')
puts str.foo # 'foo value'
puts str.bar # 'bar value'
Illustration money motivation

Opscomplete powered by makandra brand

Save money by migrating from AWS to our fully managed hosting in Germany.

  • Trusted by over 100 customers
  • Ready to use with Ruby, Node.js, PHP
  • Proactive management by operations experts
Read more Show archive.org snapshot
Posted by Henning Koch to makandra dev (2010-08-31 19:38)