Class: Nineflats::Season

Inherits:
Object
  • Object
show all
Defined in:
lib/nineflats-api/season.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ Season

Returns a new instance of Season.



5
6
7
8
9
10
11
12
# File 'lib/nineflats-api/season.rb', line 5

def initialize(json)
  season = json.first[1]
  
  @from                = season["from"]
  @to                  = season["to"]
  @price               = season["price"]
  @weekend_night_price = season["weekend_night_price"]
end

Instance Attribute Details

#fromObject

Returns the value of attribute from.



3
4
5
# File 'lib/nineflats-api/season.rb', line 3

def from
  @from
end

#priceObject

Returns the value of attribute price.



3
4
5
# File 'lib/nineflats-api/season.rb', line 3

def price
  @price
end

#toObject

Returns the value of attribute to.



3
4
5
# File 'lib/nineflats-api/season.rb', line 3

def to
  @to
end

#weekend_night_priceObject

Returns the value of attribute weekend_night_price.



3
4
5
# File 'lib/nineflats-api/season.rb', line 3

def weekend_night_price
  @weekend_night_price
end