B
Brad Phelan
Why does this not work!
########################################
module Foo
def self.foo a
puts a
end
end
class Bar
include Foo
foo "hello"
end
foo.rb:20: undefined method `foo' for Bar:Class (NoMethodError)
####################################
but this does
class Bar
def self.foo a
puts a
end
foo "hello"
end
What am I misunderstanding about modules????
########################################
module Foo
def self.foo a
puts a
end
end
class Bar
include Foo
foo "hello"
end
foo.rb:20: undefined method `foo' for Bar:Class (NoMethodError)
####################################
but this does
class Bar
def self.foo a
puts a
end
foo "hello"
end
What am I misunderstanding about modules????