Class: AppleStoreSearch::Search
- Inherits:
-
Object
- Object
- AppleStoreSearch::Search
- Defined in:
- lib/apple_store_search.rb
Overview
Your code goes here…
Instance Method Summary collapse
-
#initialize ⇒ Search
constructor
initialization.
- #search(options, selected) ⇒ Object
Constructor Details
#initialize ⇒ Search
initialization
7 8 9 10 |
# File 'lib/apple_store_search.rb', line 7 def initialize @base_url="http://itunes.apple.com/search?" #@curl = CURL.new end |
Instance Method Details
#search(options, selected) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/apple_store_search.rb', line 12 def search(,selected) @base_url=() search_parse if @data.has_key?('errorMessage') puts "Invalid key-value pair(s) in request" return end get_selected(selected) return @result #puts @data end |