Module: Monologue::ConfigurationExtensions

Included in:
Configuration
Defined in:
lib/monologue/configuration_extensions.rb

Instance Method Summary collapse

Instance Method Details

#add_class(name) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
# File 'lib/monologue/configuration_extensions.rb', line 3

def add_class(name)
  self.instance_variable_set "@#{name}", Set.new

  create_method("#{name}=".to_sym) { |val|
    instance_variable_set("@" + name, val)
  }

  create_method(name.to_sym) do
    instance_variable_get("@" + name)
  end
end