Class: RadioVISGenerator::BrandingSlide

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

Instance Method Summary collapse

Methods inherited from Slide

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

Constructor Details

This class inherits a constructor from RadioVISGenerator::Slide

Instance Method Details

#background_imageObject

I’m just an example slide so I don’t actually have a background image bundled. But here I’d return a full path to whatever I wanted behind my SVG with all the SVG’s shiny opacity.



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

def background_image
  return nil
end

#generateObject

Man, NowPlayingSlide thinks he’s got problems. I’m a complete idiot compared to that guy. Hey, want to help me out? Maybe add some functionality to me?



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

def generate
  return {
    '$$STATIONNAME$$' => 'Your Radio Station'
  }
end

#priorityObject

And it’s lower priority.



19
20
21
# File 'lib/radiovis-generator/slides/branding_slide.rb', line 19

def priority
  25
end

#redisplay_delayObject

We don’t want this one displayed so often.



15
16
17
# File 'lib/radiovis-generator/slides/branding_slide.rb', line 15

def redisplay_delay
  20
end

#svg_filenameObject

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



23
24
25
# File 'lib/radiovis-generator/slides/branding_slide.rb', line 23

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