Class: RubyHackernews::VotingService

Inherits:
Object
  • Object
show all
Includes:
MechanizeContext
Defined in:
lib/ruby-hackernews/services/voting_service.rb

Instance Method Summary collapse

Methods included from MechanizeContext

#[], #agent, agent=, #authenticated?, #require_authentication

Instance Method Details

#vote(url) ⇒ Object



6
7
8
9
10
# File 'lib/ruby-hackernews/services/voting_service.rb', line 6

def vote(url)
  require_authentication
  agent.get(url)
  return true
end