how do i create an Add object in this new file, i understand i could
just make the add method above into a class method and then i wouldnt
need to create an object at all. However how would i create an object to
use.
how do i create an Add object in this new file, i understand i could
just make the add method above into a class method and then i wouldnt
need to create an object at all. However how would i create an object to
use.
thanks
never mind i figured it out on my own i would do it like
Mathematics::Add.new
zen and the art of programming as soon as i shut my brain off by asking
a question the answer pops in my head, lol.
Because you nested your class Add within Mathematics you have to
use the fully qualified name when you are writing code that
is outside the Mathematics module: