4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# File 'lib/adhearsion/initializer/configuration.rb', line 4
def add_configuration_for(name)
configuration_class_name = "#{name}Configuration"
lowercased_name = name.to_s.underscore
class_eval(" def enable_\#{lowercased_name}(configuration_options = {})\n @\#{lowercased_name}_configuration = \#{configuration_class_name}.new(configuration_options)\n end\n\n def \#{lowercased_name}\n @\#{lowercased_name}_configuration\n end\n\n def \#{lowercased_name}_enabled?\n !\#{lowercased_name}.nil?\n end\n EVAL\nend\n", __FILE__, __LINE__)
|