class Foo def foo return 3**3 # do something end end class Bar def bar f = Foo.new f.foo end end