Class: RandomStrings::Config
- Inherits:
-
Object
- Object
- RandomStrings::Config
- Defined in:
- lib/random_strings.rb
Instance Method Summary collapse
-
#initialize(*args) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(*args) ⇒ Config
Returns a new instance of Config.
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/random_strings.rb', line 5 def initialize(*args) args.each do |method_name| self.class.class_exec do define_method("#{method_name}") do eval "@#{method_name}" end define_method("#{method_name}=") do |inp| eval "@#{method_name}=inp" end end end end |