Class: IndeedJobsearch::Search
- Inherits:
-
Object
- Object
- IndeedJobsearch::Search
- Defined in:
- lib/indeed_jobsearch/search.rb
Instance Attribute Summary collapse
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#query ⇒ Object
readonly
Returns the value of attribute query.
Instance Method Summary collapse
-
#initialize(query, location) ⇒ Search
constructor
A new instance of Search.
- #page(page_number) ⇒ Object
Constructor Details
#initialize(query, location) ⇒ Search
Returns a new instance of Search.
4 5 6 |
# File 'lib/indeed_jobsearch/search.rb', line 4 def initialize(query, location) @query, @location = query, location end |
Instance Attribute Details
#location ⇒ Object (readonly)
Returns the value of attribute location.
3 4 5 |
# File 'lib/indeed_jobsearch/search.rb', line 3 def location @location end |
#query ⇒ Object (readonly)
Returns the value of attribute query.
3 4 5 |
# File 'lib/indeed_jobsearch/search.rb', line 3 def query @query end |
Instance Method Details
#page(page_number) ⇒ Object
8 9 10 |
# File 'lib/indeed_jobsearch/search.rb', line 8 def page(page_number) SearchResultsFetcher.fetch(@query, @location, page_number) end |