Class: Messed::Configuration::Interfaces
- Inherits:
-
Object
- Object
- Messed::Configuration::Interfaces
- Includes:
- ConfigHelper
- Defined in:
- lib/messed/configuration.rb
Defined Under Namespace
Classes: IndividualInterface
Instance Method Summary collapse
- #each(&block) ⇒ Object
-
#initialize ⇒ Interfaces
constructor
A new instance of Interfaces.
- #method_missing(method, *args, &block) ⇒ Object
- #names ⇒ Object
Methods included from ConfigHelper
Constructor Details
#initialize ⇒ Interfaces
Returns a new instance of Interfaces.
29 30 31 |
# File 'lib/messed/configuration.rb', line 29 def initialize @interfaces = {} end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
41 42 43 |
# File 'lib/messed/configuration.rb', line 41 def method_missing(method, *args, &block) @interfaces[method] ||= IndividualInterface.new end |
Instance Method Details
#each(&block) ⇒ Object
33 34 35 |
# File 'lib/messed/configuration.rb', line 33 def each(&block) @interfaces.each(&block) end |
#names ⇒ Object
37 38 39 |
# File 'lib/messed/configuration.rb', line 37 def names @interfaces.keys end |