Module: GathererSetParser::QueryString
- Included in:
- Fetch
- Defined in:
- lib/gatherer_set_parser/query_string.rb
Instance Method Summary collapse
- #escaped_set ⇒ Object
- #gatherer_url(page) ⇒ Object
- #initialize(set) ⇒ Object
- #query_string ⇒ Object
- #url ⇒ Object
Instance Method Details
#escaped_set ⇒ Object
8 9 10 |
# File 'lib/gatherer_set_parser/query_string.rb', line 8 def escaped_set @query_string ||= URI.escape set_name end |
#gatherer_url(page) ⇒ Object
20 21 22 |
# File 'lib/gatherer_set_parser/query_string.rb', line 20 def gatherer_url page url + query_string + "&page=#{page}" end |
#initialize(set) ⇒ Object
4 5 6 |
# File 'lib/gatherer_set_parser/query_string.rb', line 4 def initialize set @set_name = set end |
#query_string ⇒ Object
12 13 14 |
# File 'lib/gatherer_set_parser/query_string.rb', line 12 def query_string "output=standard&set=[%22#{escaped_set}%22]" end |
#url ⇒ Object
16 17 18 |
# File 'lib/gatherer_set_parser/query_string.rb', line 16 def url "http://gatherer.wizards.com/Pages/Search/Default.aspx?" end |