Class: WebPreview

Inherits:
Object
  • Object
show all
Defined in:
lib/second_curtain/web_preview.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(uploads) ⇒ WebPreview

Returns a new instance of WebPreview.



6
7
8
# File 'lib/second_curtain/web_preview.rb', line 6

def initialize(uploads)
  @uploads = uploads
end

Instance Attribute Details

#uploadsObject (readonly)

Returns the value of attribute uploads.



4
5
6
# File 'lib/second_curtain/web_preview.rb', line 4

def uploads
  @uploads
end

Instance Method Details

#generate_htmlObject



10
11
12
13
14
15
# File 'lib/second_curtain/web_preview.rb', line 10

def generate_html
  lib_path = File.expand_path(File.dirname(__FILE__))
  template = File.read(lib_path + "/template.mustache.html")
  
  Mustache.render(template, :uploads => @uploads, :travis_id =>  ENV['TRAVIS_JOB_ID'])
end