[Rails] Re: A super-easy and great way to implement Gem configuration

2012-09-27 Thread gsw
Just as an update, I had bugs in the previous code provided and fixed with help from Jesús Gabriel y Galán and Calvin B. on the list in this post: http://www.ruby-forum.com/topic/4406183 module MyModule class self attr_accessor :debug, :proc_or_lambda, :some_array, :some_hash, :time

[Rails] Re: A super-easy and great way to implement Gem configuration

2012-09-23 Thread Ilia Bylich
I am not sure that this way is simple. I usually use for gem configuration this code require 'active_support/configurable' module GemModule include ActiveSupport::Configurable class self def setup yield config end end end And then you can write GemModule.setup do |config|

[Rails] Re: A super-easy and great way to implement Gem configuration

2012-09-23 Thread gsw
On Sunday, September 23, 2012 8:11:43 AM UTC-4, Ilia Bylich wrote: I am not sure that this way is simple. I usually use for gem configuration this code require 'active_support/configurable' module GemModule include ActiveSupport::Configurable class self def setup yield