class SportsbookAg::Feed::NFL
Constants
- FEED_NAME
Attributes
_data[R]
_xml[R]
games[R]
updated_at[R]
Public Class Methods
new(path = nil)
click to toggle source
# File lib/sportsbook_ag/feed/nfl.rb, line 8 def initialize(path = nil) @_xml = open(path || (BASE_URL + FEED_NAME)).read @updated_at = Time.now @_data = Hash.from_xml(_xml).deep_symbolize_keys! parse end
Private Instance Methods
parse()
click to toggle source
# File lib/sportsbook_ag/feed/nfl.rb, line 17 def parse parse_games end
parse_games()
click to toggle source
# File lib/sportsbook_ag/feed/nfl.rb, line 21 def parse_games @games = [] _data[:rss][:channel][:item].each do |data| games << Game.new(data) end end