class Foo def initialize(bar) @bar = bar end def bar @bar end end def Foo(bar) Foo.new(bar) end Foo("this").bar # => "this"