booking_locations 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/booking_locations/location.rb +11 -5
- data/lib/booking_locations/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 539fd819b4941dcbd0027147abf45d8e6061550b
|
4
|
+
data.tar.gz: c060eacb91f9da6b514f88f328154b4e387e897a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3cc408330e0afcb341a3bde19f809b9ef7b0c6f93a61251f0e0081e7f99963b977fe41e2c3b471d7f498ed0409ebb966aecc6ea931728a567846d123554c39ff
|
7
|
+
data.tar.gz: 952de21a2d951e62ffbc68fc47cd1b036d5b385b0240f024adaeb9d093847755d02b5568c1cb3975b6ce9b7447e729ff16daf699dc0efa128cbe4e180cf8d5c6
|
data/CHANGELOG.md
CHANGED
@@ -41,12 +41,18 @@ module BookingLocations
|
|
41
41
|
@slots ||= @data['slots'].map { |slot| Slot.new(slot) }
|
42
42
|
end
|
43
43
|
|
44
|
+
def guider_name_for(guider_id)
|
45
|
+
guiders.find { |guider| guider.id == guider_id }.name
|
46
|
+
end
|
47
|
+
|
48
|
+
def location_for(location_id)
|
49
|
+
return self if id == location_id
|
50
|
+
|
51
|
+
locations.find { |location| location.id == location_id }
|
52
|
+
end
|
53
|
+
|
44
54
|
def name_for(location_id)
|
45
|
-
|
46
|
-
name
|
47
|
-
else
|
48
|
-
locations.find { |location| location.id == location_id }.name
|
49
|
-
end
|
55
|
+
location_for(location_id).name
|
50
56
|
end
|
51
57
|
end
|
52
58
|
end
|