hostelify 0.3.9 → 0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/hostelify.gemspec +1 -1
- data/lib/hostelify/hostel.rb +1 -1
- data/lib/hostelify/hostelworld.rb +1 -1
- metadata +1 -1
data/Rakefile
CHANGED
data/hostelify.gemspec
CHANGED
data/lib/hostelify/hostel.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
class Hostelify
|
2
2
|
attr_accessor :hostel_id, :name, :address, :description, :facilities, :ratings, :directions, :geo, :images, :video, :availability
|
3
|
-
attr_accessor :rating, :dorm, :single, :unavailable, :
|
3
|
+
attr_accessor :rating, :dorm, :single, :unavailable, :genre
|
4
4
|
|
5
5
|
def initialize(options = {})
|
6
6
|
options.each {
|
@@ -132,7 +132,7 @@ class Hostelworld
|
|
132
132
|
url = row.at("h2/a")['href']
|
133
133
|
rating = row.at("h4/text()")
|
134
134
|
rating = rating.to_s.to_i unless rating.nil?
|
135
|
-
|
135
|
+
genre = row.at("div.hostelListingImage/span").inner_text
|
136
136
|
hostel_id = url.match(/[\d]*$/).to_s
|
137
137
|
|
138
138
|
if options[:date]
|