Class: TalkTalkTV::Film

Inherits:
Object
  • Object
show all
Defined in:
lib/talktalk_tv/film.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(title:, url: nil, image_url: nil, certificate: nil, release_year: nil, running_time_in_minutes: nil, buy_price: nil, rental_price: nil) ⇒ Film

Returns a new instance of Film.



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/talktalk_tv/film.rb', line 3

def initialize(
  title:,
  url: nil,
  image_url: nil,
  certificate: nil,
  release_year: nil,
  running_time_in_minutes: nil,
  buy_price: nil,
  rental_price: nil
)
  @title = title
  @url = url
  @image_url = image_url
  @certificate = certificate
  @release_year = release_year
  @running_time_in_minutes = running_time_in_minutes
  @buy_price = buy_price
  @rental_price = rental_price
end

Instance Attribute Details

#buy_priceObject (readonly)

Returns the value of attribute buy_price.



23
24
25
# File 'lib/talktalk_tv/film.rb', line 23

def buy_price
  @buy_price
end

#certificateObject (readonly)

Returns the value of attribute certificate.



23
24
25
# File 'lib/talktalk_tv/film.rb', line 23

def certificate
  @certificate
end

#image_urlObject (readonly)

Returns the value of attribute image_url.



23
24
25
# File 'lib/talktalk_tv/film.rb', line 23

def image_url
  @image_url
end

#release_yearObject (readonly)

Returns the value of attribute release_year.



23
24
25
# File 'lib/talktalk_tv/film.rb', line 23

def release_year
  @release_year
end

#rental_priceObject (readonly)

Returns the value of attribute rental_price.



23
24
25
# File 'lib/talktalk_tv/film.rb', line 23

def rental_price
  @rental_price
end

#running_time_in_minutesObject (readonly)

Returns the value of attribute running_time_in_minutes.



23
24
25
# File 'lib/talktalk_tv/film.rb', line 23

def running_time_in_minutes
  @running_time_in_minutes
end

#titleObject (readonly)

Returns the value of attribute title.



23
24
25
# File 'lib/talktalk_tv/film.rb', line 23

def title
  @title
end

#urlObject (readonly)

Returns the value of attribute url.



23
24
25
# File 'lib/talktalk_tv/film.rb', line 23

def url
  @url
end