class HQTrivia::Schedule::Announcement

The Schedule Announcement Class. This is an announcement above the schedule

Public Class Methods

new(data) click to toggle source

@param data [JSON] the data. @!visibility private

# File lib/hqtrivia/schedule/announcement.rb, line 5
def initialize(data)
  @data = data
end

Public Instance Methods

accent_color() click to toggle source

@return [String] the accent color

# File lib/hqtrivia/schedule/announcement.rb, line 15
def accent_color
  @data['accentColor']
end
active?() click to toggle source

@return [true, false] if this announcement is active

# File lib/hqtrivia/schedule/announcement.rb, line 72
def active?
  @data['active']
end
background_color() click to toggle source

@return [String] the background color

# File lib/hqtrivia/schedule/announcement.rb, line 20
def background_color
  @data['backgroundColor']
end
background_image() click to toggle source

@return [String] the background image

# File lib/hqtrivia/schedule/announcement.rb, line 25
def background_image
  @data['backgroundImage']
end
background_video() click to toggle source

@return [String] the background video

# File lib/hqtrivia/schedule/announcement.rb, line 30
def background_video
  @data['backgroundVideo']
end
display_name() click to toggle source

@return [String] the display name of this announcement

# File lib/hqtrivia/schedule/announcement.rb, line 10
def display_name
  @data['displayName']
end
fine_print() click to toggle source

Basically the description @return [String] fine print

# File lib/hqtrivia/schedule/announcement.rb, line 47
def fine_print
  @data['finePrint']
end
how_it_works() click to toggle source

Basically the summary @return [String] how it works

# File lib/hqtrivia/schedule/announcement.rb, line 41
def how_it_works
  @data['howItWorks']
end
name() click to toggle source

@return [String] the name of this announcement

# File lib/hqtrivia/schedule/announcement.rb, line 62
def name
  @data['name']
end
prize_cents() click to toggle source

@return [Integer] the prize (in cents)

# File lib/hqtrivia/schedule/announcement.rb, line 52
def prize_cents
  @data['prizeCents']
end
prize_currency() click to toggle source

@return [String] the prize currency

# File lib/hqtrivia/schedule/announcement.rb, line 57
def prize_currency
  @data['prizeCurrency']
end
state() click to toggle source

@return [String] the state of this announcement

# File lib/hqtrivia/schedule/announcement.rb, line 77
def state
  @data['state']
end
text_color() click to toggle source

@return [String] the color of the text

# File lib/hqtrivia/schedule/announcement.rb, line 35
def text_color
  @data['textColor']
end
time() click to toggle source

@return [Time] the time of this announcement (countdowns to this)

# File lib/hqtrivia/schedule/announcement.rb, line 67
def time
  Time.parse(@data['time'])
end