Sha256: 93b250e71cb9c952a43ac15fab9f902feee15cde2ff54cd695f7d7e1bab762b2

Contents?: true

Size: 862 Bytes

Versions: 3

Compression:

Stored size: 862 Bytes

Contents

require 'gscraper/search/query'

module GScraper
  module Search
    #
    # Returns a new Query object with the given _opts_. See Query.new.
    #
    #   Search.query(:query => 'ruby', :with_words => 'rspec rails')
    #
    #   Search.query(:exact_phrase => 'fluent interfaces') do |q|
    #     q.within_past_week = true
    #   end
    #
    def Search.query(opts={},&block)
      Query.new(opts,&block)
    end

    #
    # Returns the Query object that represents the specified _url_.
    # See Query.from_url.
    #
    #   Search.query_from_url('http://www.google.com/search?q=ruby+zen)
    #
    #   Search.query_from_url('http://www.google.com/search?q=ruby') do |q|
    #     q.within_last_month = true
    #     q.occurrs_within = :title
    #   end
    #
    def Search.query_from_url(url,&block)
      Query.from_url(url,&block)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
gscraper-0.1.0 lib/gscraper/search/search.rb
gscraper-0.1.1 lib/gscraper/search/search.rb
gscraper-0.1.2 lib/gscraper/search/search.rb