Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/image_downloader/parser.rb
Instance Method Summary collapse
Instance Method Details
#to_hash_keys(&block) ⇒ Object
2 3 4 5 6 |
# File 'lib/image_downloader/parser.rb', line 2 def to_hash_keys(&block) Hash[*self.collect { |v| [v, block.call(v)] }.flatten] end |
#to_hash_values(&block) ⇒ Object
8 9 10 11 12 |
# File 'lib/image_downloader/parser.rb', line 8 def to_hash_values(&block) Hash[*self.collect { |v| [block.call(v), v] }.flatten] end |