Imagine the following Ruby Module:
module Foo
def inst_method
puts "Called Foo.inst_method"
end
def self.class_method
puts "Called Foo.class_method"
end
end
Obviously Foo.class_method
can be called without any class instances. However, what's happening to Foo.inst_method
? Is it possible to call Foo.inst_method
without previously including/extending a class?
Disclaimer: The question isn't focused on solving a real problem. I'm just trying to improve my understanding of the Ruby object system.