Class: Campgrounds::Base

Inherits:
Object
  • Object
show all
Includes:
GeoKit::Geocoders
Defined in:
lib/campgrounds/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_key) ⇒ Base

Returns a new instance of Base.



7
8
9
# File 'lib/campgrounds/base.rb', line 7

def initialize(api_key)
  @api_key = api_key
end

Instance Attribute Details

#api_keyObject

Returns the value of attribute api_key.



5
6
7
# File 'lib/campgrounds/base.rb', line 5

def api_key
  @api_key
end

Instance Method Details

#campground_detailsObject



15
16
17
# File 'lib/campgrounds/base.rb', line 15

def campground_details
  @campground_details ||= Campgrounds::CampgroundDetails.new(@api_key)
end

#campground_searchObject



11
12
13
# File 'lib/campgrounds/base.rb', line 11

def campground_search
  @campground_search ||= Campgrounds::CampgroundSearch.new(@api_key)
end

#campsite_searchObject



19
20
21
# File 'lib/campgrounds/base.rb', line 19

def campsite_search
  @campsite_search ||= Campgrounds::CampsiteSearch.new(@api_key)
end