Class: RakutenWebService::Gora::CourseDetail
- Inherits:
-
Resource
- Object
- Resource
- RakutenWebService::Gora::CourseDetail
show all
- Defined in:
- lib/rakuten_web_service/gora/course_detail.rb
Defined Under Namespace
Classes: Plan, Rating
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Resource
#==, #[], all, attribute, client, endpoint, #get_attribute, #initialize, resource_name, search, set_parser, set_resource_name
Class Method Details
.find(golf_course_id) ⇒ Object
7
8
9
|
# File 'lib/rakuten_web_service/gora/course_detail.rb', line 7
def find(golf_course_id)
search({golfCourseId: golf_course_id}).first
end
|
Instance Method Details
#new_plans ⇒ Object
31
32
33
|
# File 'lib/rakuten_web_service/gora/course_detail.rb', line 31
def new_plans
get_attribute('newPlans').map {|plan| Plan.new(plan['plan'])}
end
|
#ratings ⇒ Object
27
28
29
|
# File 'lib/rakuten_web_service/gora/course_detail.rb', line 27
def ratings
get_attribute('ratings').map {|rating| Rating.new(rating['rating'])}
end
|