Class: Arstotzka::Reader Private
- Inherits:
-
Object
- Object
- Arstotzka::Reader
- Includes:
- Base
- Defined in:
- lib/arstotzka/reader.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Reads a value from a hash using the keys as list of keys
Instance Method Summary collapse
-
#initialize(options_hash = {}) ⇒ Arstotzka::Reader
constructor
private
Creates a new instance of Reader.
-
#read(hash, index) ⇒ Object
private
Reads the value of one key in the hash.
Methods included from Base
Constructor Details
#initialize(options_hash = {}) ⇒ Arstotzka::Reader #initialize(options) ⇒ Arstotzka::Reader
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Creates a new instance of Reader
23 24 25 |
# File 'lib/arstotzka/reader.rb', line 23 def initialize( = {}) self. = end |
Instance Method Details
#read(hash, index) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Reads the value of one key in the hash
61 62 63 64 65 |
# File 'lib/arstotzka/reader.rb', line 61 def read(hash, index) key = keys[index] KeyReader.new(hash, key, ).read end |