Class: Allocine::Search

Inherits:
MovieList show all
Defined in:
lib/allocine/search.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(query) ⇒ Search

Initialize a new Allocine search with the specified query

search = Allocine::Search.new("Superman")


10
11
12
# File 'lib/allocine/search.rb', line 10

def initialize(query)
  @query = query
end

Instance Attribute Details

#queryObject (readonly)

Returns the value of attribute query.



4
5
6
# File 'lib/allocine/search.rb', line 4

def query
  @query
end

Instance Method Details

#moviesObject

Returns an array of Allocine::Movie objects for easy search result yielded.



15
16
17
# File 'lib/allocine/search.rb', line 15

def movies
  @movies ||= parse_movies
end