Hello all.
In this example, as i understand that included block is running when Exclaimable module is included in Person and after a Person class methods are 'initialized'
require 'active_support/concern'
module Exclaimable
extend ActiveSupport::Concern
included do
self.new.hello
end
end
class Person
include Exclaimable
def hello
puts 'person hello'
end
end
Output: Exception: NoMethodError: undefined method `hello' for #<Person:0x00000103cbdcd0>
But i see that, Person class doesn't have hello method, why ? Please, help !