Class: Nineflats::Calendar
Instance Attribute Summary collapse
-
#days ⇒ Object
Returns the value of attribute days.
-
#month ⇒ Object
Returns the value of attribute month.
-
#year ⇒ Object
Returns the value of attribute year.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(json) ⇒ Calendar
constructor
A new instance of Calendar.
Methods inherited from Base
base_url, client_app_key, client_app_key=, object_link
Constructor Details
#initialize(json) ⇒ Calendar
Returns a new instance of Calendar.
5 6 7 8 9 10 11 |
# File 'lib/nineflats-api/calendar.rb', line 5 def initialize(json) calendar = json.first[1] @year = calendar["year"] @month = calendar["month"] @days = calendar["days"] end |
Instance Attribute Details
#days ⇒ Object
Returns the value of attribute days.
3 4 5 |
# File 'lib/nineflats-api/calendar.rb', line 3 def days @days end |
#month ⇒ Object
Returns the value of attribute month.
3 4 5 |
# File 'lib/nineflats-api/calendar.rb', line 3 def month @month end |
#year ⇒ Object
Returns the value of attribute year.
3 4 5 |
# File 'lib/nineflats-api/calendar.rb', line 3 def year @year end |
Class Method Details
.api_call(slug, year, month) ⇒ Object
13 14 15 |
# File 'lib/nineflats-api/calendar.rb', line 13 def self.api_call(slug, year, month) base_url + "/places/#{slug}/calendar/#{year}/#{month}?client_id=#{Nineflats::Base.client_app_key}" end |