Class: Guts::Configuration
- Inherits:
-
Object
- Object
- Guts::Configuration
- Defined in:
- lib/guts/configuration.rb
Overview
Configuration class for Guts
Instance Method Summary collapse
-
#method_missing(name, *args) ⇒ Object
Getter and setter method for configuration so that there is not a set amount of configs.
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args) ⇒ Object
Getter and setter method for configuration so that there is not a set amount of configs
22 23 24 25 26 27 28 29 30 |
# File 'lib/guts/configuration.rb', line 22 def method_missing(name, *args) name = name.to_s if name =~ /=$/ instance_variable_set "@#{name.chop}", args.first else instance_variable_get "@#{name}" end end |