Class: FCReminder::Providers::LiveScore

Inherits:
Base
  • Object
show all
Defined in:
lib/fc-reminder/providers/livescore.rb

Constant Summary collapse

BASE_URL =
"http://www.livescore.com"

Instance Attribute Summary

Attributes inherited from Base

#client

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from FCReminder::Providers::Base

Instance Method Details

#run(team_name) ⇒ Object



10
11
12
13
# File 'lib/fc-reminder/providers/livescore.rb', line 10

def run(team_name)
  cell = search(client.get(url), team_name.downcase)
  cell.nil? ? super : prepare_output_from(cell)
end

#urlObject



6
7
8
# File 'lib/fc-reminder/providers/livescore.rb', line 6

def url
  "#{BASE_URL}/soccer/#{Time.now.strftime("%Y-%m-%d")}"
end