Class: Messed::Configuration::Interfaces

Inherits:
Object
  • Object
show all
Includes:
ConfigHelper
Defined in:
lib/messed/configuration.rb

Defined Under Namespace

Classes: IndividualInterface

Instance Method Summary collapse

Methods included from ConfigHelper

#with

Constructor Details

#initializeInterfaces

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

#namesObject



37
38
39
# File 'lib/messed/configuration.rb', line 37

def names
  @interfaces.keys
end