Class: ScheduleScraper::Pointstreak::Event

Inherits:
Nibbler
  • Object
show all
Includes:
Event
Defined in:
lib/schedule-scraper/pointstreak/event.rb

Instance Method Summary collapse

Methods included from Event

included, #to_csv, #to_gcal, #to_ical

Instance Method Details

#all_day?Boolean

Returns:

  • (Boolean)


43
44
45
# File 'lib/schedule-scraper/pointstreak/event.rb', line 43

def all_day?
  false
end

#descriptionObject



47
48
49
# File 'lib/schedule-scraper/pointstreak/event.rb', line 47

def description
  title
end

#end_dateObject



22
23
24
# File 'lib/schedule-scraper/pointstreak/event.rb', line 22

def end_date
  start_date
end

#end_date_timeObject



38
39
40
41
# File 'lib/schedule-scraper/pointstreak/event.rb', line 38

def end_date_time
  # default to 1 hr
  start_date_time.to_time + 3600
end

#private?Boolean

Returns:

  • (Boolean)


51
52
53
# File 'lib/schedule-scraper/pointstreak/event.rb', line 51

def private?
  true
end

#start_dateObject



18
19
20
# File 'lib/schedule-scraper/pointstreak/event.rb', line 18

def start_date
  Date.parse(date).strftime("%m/%d/%y")
end

#start_date_timeObject

def end_time

will default to one hour?

end



34
35
36
# File 'lib/schedule-scraper/pointstreak/event.rb', line 34

def start_date_time
  DateTime.strptime "#{start_date} #{start_time}", '%m/%d/%y %H:%M %P'
end

#start_timeObject



26
27
28
# File 'lib/schedule-scraper/pointstreak/event.rb', line 26

def start_time
  time
end

#titleObject



14
15
16
# File 'lib/schedule-scraper/pointstreak/event.rb', line 14

def title
  "#{home_team} vs. #{away_team}"
end