Module: HashDial
- Included in:
- Hash
- Defined in:
- lib/hash_dial.rb,
lib/hash_dial/version.rb,
lib/hash_dial/hash_dialler.rb
Defined Under Namespace
Classes: HashDialler
Constant Summary collapse
- VERSION =
"1.0.2"
Instance Method Summary collapse
-
#call(*lookup) ⇒ Object
Called directly on a Hash, immediately dials and calls the hash keys specified as arguments.
-
#to_dial(*lookup) ⇒ Object
(also: #dial)
Called on a Hash, returns a HashDialler object for that Hash.
Instance Method Details
#call(*lookup) ⇒ Object
Called directly on a Hash, immediately dials and calls the hash keys specified as arguments. Returns the value found, or nil.
20 21 22 |
# File 'lib/hash_dial.rb', line 20 def call(*lookup) return HashDialler.new(self, *lookup).call end |
#to_dial(*lookup) ⇒ Object Also known as: dial
Called on a Hash, returns a HashDialler object for that Hash.
10 11 12 |
# File 'lib/hash_dial.rb', line 10 def to_dial(*lookup) return HashDialler.new(self, *lookup) end |