Class: Hackershout::Provider::Hackernews
- Defined in:
- lib/hackershout/provider/hackernews.rb
Constant Summary collapse
- URL =
{ :login => 'http://news.ycombinator.com/submit' }
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Methods included from Output
Constructor Details
This class inherits a constructor from Hackershout::Provider::Base
Instance Method Details
#post ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/hackershout/provider/hackernews.rb', line 9 def post page = agent.get(URL[:login]) login_form = page.forms.first login_form.u = @login login_form.p = @password page = login_form.submit submit(page) end |