Class: RadioVISGenerator::NowPlayingSlide

Inherits:
Slide
  • Object
show all
Defined in:
lib/radiovis-generator/slides/now_playing_slide.rb

Instance Method Summary collapse

Methods inherited from Slide

#background_image, #changed?, composite, #display_time, #initialize, #name, #priority, #redisplay?, #redisplay_delay, #render, render_svg, resize_to_fit, rewrite_svg, #text

Constructor Details

This class inherits a constructor from RadioVISGenerator::Slide

Instance Method Details

#generateObject

In here I’d do some clever stuff if I were being clever. But I’m not. I’m just an example slide. You’re clever, right? You can help me out here!



4
5
6
7
8
9
# File 'lib/radiovis-generator/slides/now_playing_slide.rb', line 4

def generate
  return {
    '$$STATIONNAME$$' => 'Your Radio Station',
    '$$NOWPLAYING$$'  => 'Some Track is Playing'
  }
end

#svg_filenameObject

Specify our filename - this is messy because it’s relative to the gem.



11
12
13
# File 'lib/radiovis-generator/slides/now_playing_slide.rb', line 11

def svg_filename
  return "#{File.expand_path(File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))))}/templates/now-playing-slide.svg"
end