lib/mod_cons.rb in mod-cons-0.1.1 vs lib/mod_cons.rb in mod-cons-0.2.0
- old
+ new
@@ -105,17 +105,19 @@
end
end
end
self.instance_eval(&block) if block_given?
end
- unless self.to_hash == config_signature
- @config_changed.each do |listener|
- listener.call(self)
- end
- end
+ post_config unless self.to_hash == config_signature
return self
end
+ def post_config
+ @config_changed.each do |listener|
+ listener.call(self)
+ end
+ end
+
def config_changed(&block)
@config_changed << block
return self
end
\ No newline at end of file