Yep:
1.9.3p0 :005 module B
1.9.3p0 :006? def name
1.9.3p0 :007? puts 'b module'
1.9.3p0 :008? end
1.9.3p0 :009? end
= nil
1.9.3p0 :010 module C
1.9.3p0 :011? def name
1.9.3p0 :012? puts 'c module'
1.9.3p0 :013? end
1.9.3p0 :014? end
= nil
1.9.3p0 :015 class A
1.9.3p0
…looking for a module named Rendering in the ActionController
namespace, since that is the namesapce that Base is defined in???
module Rendering
def greet
puts 'hi'
end
end
module ActionController
class Base
include Rendering
end
end
obj = ActionController::Base.new
obj.greet
On Monday, 17 September 2012 21:04:58 UTC-4, John Merlino wrote:
In Ruby, classes are never closed: you can always add methods to an
existing class. This applies to the classes you write as well as the
standard, built-in classes. All you have to do is open up a class
definition for an
So it does appear that the ActionController::Rendering module does
include AbstractController::Rendering, which means a call to super in
the render method of ActionController::Rendering will in turn call
the render method of AbstractController::Rendering. What makes this
somewhat confusing is
4 matches
Mail list logo