Class: HostelifyCollection
- Inherits:
-
Array
- Object
- Array
- HostelifyCollection
- Defined in:
- lib/hostelify/hostelify.rb
Instance Method Summary collapse
- #descs ⇒ Object
-
#ids ⇒ Object
This collection does everything an Array does, plus you can add utility methods like names.
- #names ⇒ Object
Instance Method Details
#descs ⇒ Object
30 31 32 33 34 |
# File 'lib/hostelify/hostelify.rb', line 30 def descs collect do |i| i.description end end |
#ids ⇒ Object
This collection does everything an Array does, plus you can add utility methods like names.
18 19 20 21 22 |
# File 'lib/hostelify/hostelify.rb', line 18 def ids collect do |i| i.hostel_id end end |
#names ⇒ Object
24 25 26 27 28 |
# File 'lib/hostelify/hostelify.rb', line 24 def names collect do |i| i.name end end |