Class: Ilex::ComponentWardens

Inherits:
Object
  • Object
show all
Defined in:
lib/ilex/component_wardens.rb

Overview

Thin wrapper around a hash of component wardens such that the default is always an instance of ComponentWarden

Instance Method Summary collapse

Constructor Details

#initialize(component) ⇒ ComponentWardens

Returns a new instance of ComponentWardens.



8
9
10
11
12
# File 'lib/ilex/component_wardens.rb', line 8

def initialize(component)
  @wardens = Hash.new do |hash, key|
    hash[key] = ComponentWarden.new(component, key)
  end
end

Instance Method Details

#[](key) ⇒ Object



14
15
16
# File 'lib/ilex/component_wardens.rb', line 14

def [](key)
  @wardens[key]
end