Page 1 of 1
[03:21:08] NorthLumberJack: helpa: Just so I can raise an error for my method if the param is not a collection
[14:13:08] NorthLumberJack: hello masters, I am new to metaprgramming, I am trying to make a Predictable module, when I include this module into a class I want certain methods to raise NotImplimentedError if the methods are not overwritten in the including class...
[14:22:20] NorthLumberJack: @havewood https://gist.github.com/JerryArns/5d62f18a480017cfa6d9240055b93a8a
[15:07:05] NorthLumberJack: @havenwood So Im trying your code from https://gist.github.com/havenwood/2409d79d83dfb6a9e531094141a0d956 and its thowing errors from other modules that their methods are not available, why would that be?
[15:08:00] NorthLumberJack: im basically trying to make Rails model classes have a set of my Predicatble methods
[15:16:31] NorthLumberJack: @havenwood here you go https://gist.github.com/JerryArns/3a40ac8f85a97f00f2c8a2a6a9abcf8f
[15:21:03] NorthLumberJack: havenwood: oh man that example code of the crazy project just blows my mind, would take me an hr to read through.
[15:24:59] NorthLumberJack: havenwood: The only thing that Predictable is doing so far is making sure the including class is implimenting certain methods, I guess i would check their returned data for uniformity in the future
[15:45:35] NorthLumberJack: havenwood: so i have to include the module after my method definitions, does that seem right?
[16:01:10] NorthLumberJack: havenwood: this metaprogramming stuff is fantastic, i need to learn more
[17:44:45] NorthLumberJack: havewood: The code works greats just wanted to say thanks and had one question. When a method is not included the raise NotImplimentedError is called, why does the including class throw udefined method errors for existing class methods?