Class: GoogleMovies::Movie

Inherits:
Object
  • Object
show all
Defined in:
lib/google_movies/models/movie.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, id, information, times) ⇒ Movie

Returns a new instance of Movie.



6
7
8
9
10
11
# File 'lib/google_movies/models/movie.rb', line 6

def initialize(name, id, information, times)
  @name = name
  @id = id
  @information = information.gsub("- Trailer - IMDb - : ", "").strip
  @times = times
end

Instance Attribute Details

#idObject

Returns the value of attribute id.



4
5
6
# File 'lib/google_movies/models/movie.rb', line 4

def id
  @id
end

#informationObject

Returns the value of attribute information.



4
5
6
# File 'lib/google_movies/models/movie.rb', line 4

def information
  @information
end

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/google_movies/models/movie.rb', line 4

def name
  @name
end

#timesObject

Returns the value of attribute times.



4
5
6
# File 'lib/google_movies/models/movie.rb', line 4

def times
  @times
end