Module: HackernewsRuby::Request
- Included in:
- Client
- Defined in:
- lib/hackernews_ruby/request.rb
Instance Method Summary collapse
Instance Method Details
#get(path, options) ⇒ Object
8 9 10 |
# File 'lib/hackernews_ruby/request.rb', line 8 def get(path, ) request(:get, path, ) end |
#request(method, path, options) ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/hackernews_ruby/request.rb', line 12 def request(method, path, ) response = connection.send(method) do |request| case method when :get request.url(path, ) end end response.body end |