Class: TomatoPower::Clip

Inherits:
Object
  • Object
show all
Defined in:
lib/tomato_power/movie/clip.rb

Overview

Clip of a movie

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(clip = {}) ⇒ Clip

Returns a new instance of Clip.



5
6
7
8
9
10
# File 'lib/tomato_power/movie/clip.rb', line 5

def initialize clip={}
  @title = clip["title"]
   @duration = clip["duration"]
  @thumbnail = clip["thumbnail"]
  @link = clip["links"]["alternate"]
end

Instance Attribute Details

#durationObject (readonly)

Returns the value of attribute duration.



4
5
6
# File 'lib/tomato_power/movie/clip.rb', line 4

def duration
  @duration
end

Returns the value of attribute link.



4
5
6
# File 'lib/tomato_power/movie/clip.rb', line 4

def link
  @link
end

#thumbnailObject (readonly)

Returns the value of attribute thumbnail.



4
5
6
# File 'lib/tomato_power/movie/clip.rb', line 4

def thumbnail
  @thumbnail
end

#titleObject (readonly)

Returns the value of attribute title.



4
5
6
# File 'lib/tomato_power/movie/clip.rb', line 4

def title
  @title
end