Class: Usable::Config
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- Usable::Config
- Defined in:
- lib/usable/config.rb
Defined Under Namespace
Modules: Null
Instance Method Summary collapse
Instance Method Details
#add_module(mod) ⇒ Object
7 8 9 |
# File 'lib/usable/config.rb', line 7 def add_module(mod) modules << mod end |
#available_methods ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/usable/config.rb', line 11 def available_methods modules.each_with_object(Hash.new(default_method)) do |mod, result| mod.instance_methods.each do |method_name| result[method_name] = mod.instance_method method_name end end end |
#default_method ⇒ Object
19 20 21 |
# File 'lib/usable/config.rb', line 19 def default_method Null.instance_method(:default_method) end |
#modules ⇒ Object
3 4 5 |
# File 'lib/usable/config.rb', line 3 def modules @modules ||= [] end |