Read more

Ruby lets you redefine backticks

Henning Koch
July 11, 2014Software engineer at makandra GmbH

This actually works:

class Klass

  def initialize
    `hi world`
  end

  def `(message)
    puts "Called with backticks: #{message}"
  end
  
end

Klass.new # Prints "Called with backticks: hi world"
Illustration UI/UX Design

UI/UX Design by makandra brand

We make sure that your target audience has the best possible experience with your digital product. You get:

  • Design tailored to your audience
  • Proven processes customized to your needs
  • An expert team of experienced designers
Read more Show archive.org snapshot

Hat tip to @jcoglan Show archive.org snapshot .

Posted by Henning Koch to makandra dev (2014-07-11 17:39)