Class: SellDotCom::Search
- Inherits:
-
Object
- Object
- SellDotCom::Search
- Defined in:
- lib/selldotcom/search.rb
Instance Attribute Summary collapse
-
#results ⇒ Object
readonly
Returns the value of attribute results.
-
#search_phrase ⇒ Object
Returns the value of attribute search_phrase.
Instance Method Summary collapse
-
#initialize(search_phrase) ⇒ Search
constructor
A new instance of Search.
- #search ⇒ Object
Constructor Details
#initialize(search_phrase) ⇒ Search
Returns a new instance of Search.
7 8 9 10 |
# File 'lib/selldotcom/search.rb', line 7 def initialize(search_phrase) @search_phrase ||= search_phrase @search_uri ||= search_uri end |
Instance Attribute Details
#results ⇒ Object (readonly)
Returns the value of attribute results.
5 6 7 |
# File 'lib/selldotcom/search.rb', line 5 def results @results end |
#search_phrase ⇒ Object
Returns the value of attribute search_phrase.
4 5 6 |
# File 'lib/selldotcom/search.rb', line 4 def search_phrase @search_phrase end |
Instance Method Details
#search ⇒ Object
12 13 14 15 |
# File 'lib/selldotcom/search.rb', line 12 def search response = Typhoeus::Request.get(@search_uri) @results = parse(response.body) end |