Class: Landline::Util::LookupROProxy
- Inherits:
-
Object
- Object
- Landline::Util::LookupROProxy
- Defined in:
- lib/landline/util/lookup.rb
Overview
Read-only lookup proxy
Instance Attribute Summary collapse
-
#lookup ⇒ Object
Returns the value of attribute lookup.
Instance Method Summary collapse
-
#[](key) ⇒ Object?
Get a value by key.
-
#initialize(lookup) ⇒ LookupROProxy
constructor
A new instance of LookupROProxy.
Constructor Details
#initialize(lookup) ⇒ LookupROProxy
39 40 41 |
# File 'lib/landline/util/lookup.rb', line 39 def initialize(lookup) @lookup = lookup end |
Instance Attribute Details
#lookup ⇒ Object
Returns the value of attribute lookup.
50 51 52 |
# File 'lib/landline/util/lookup.rb', line 50 def lookup @lookup end |
Instance Method Details
#[](key) ⇒ Object?
Get a value by key
46 47 48 |
# File 'lib/landline/util/lookup.rb', line 46 def [](key) @lookup.[](key) end |