Sha256: 0d41408b2476771e90e4fc771b615667f030372bdacfd71eb0214548ded2c515
Contents?: true
Size: 832 Bytes
Versions: 22
Compression:
Stored size: 832 Bytes
Contents
module SportsDataApi module Ncaamb class Tournament attr_reader :id, :status, :year, :season, :status, :start_date, :end_date, :name, :location def initialize(args={}) xml = args.fetch(:xml) @year = args[:year] ? args[:year].to_i : nil @season = args[:season] ? args[:season].to_sym : nil xml = xml.first if xml.is_a? Nokogiri::XML::NodeSet if xml.is_a? Nokogiri::XML::Element @id = xml['id'] @start_date = Time.parse xml['start_date'] @end_date = Time.parse xml['end_date'] @status = xml['status'] @name = xml['name'] @location = xml['location'] @status = xml['status'] end end def schedule Ncaamb.tournament_schedule(year, season, id) end end end end
Version data entries
22 entries across 22 versions & 1 rubygems