wethu
5/8/2017 - 1:12 AM

foo.rb

class Foo
  def initialize(bar)
    @bar = bar
  end
  def bar
    @bar
  end
end

def Foo(bar)
  Foo.new(bar)
end

Foo("this").bar
# => "this"