I'm struggling with understanding understanding OOP. I am trying to use IRB to play around with Ruby and deepen my understanding.
In IRB
foo = Object.new
Creates a new object However if I try and give irb a definition and call it on that object it doesn't work. (does the def have to happen in a .rb file and loaded into Ruby?)
def bar "hello" end