Class: WebPreview
- Inherits:
-
Object
- Object
- WebPreview
- Defined in:
- lib/second_curtain/web_preview.rb
Instance Attribute Summary collapse
-
#uploads ⇒ Object
readonly
Returns the value of attribute uploads.
Instance Method Summary collapse
- #generate_html ⇒ Object
-
#initialize(uploads) ⇒ WebPreview
constructor
A new instance of WebPreview.
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
#uploads ⇒ Object (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_html ⇒ Object
10 11 12 13 14 15 |
# File 'lib/second_curtain/web_preview.rb', line 10 def generate_html lib_path = File.(File.dirname(__FILE__)) template = File.read(lib_path + "/template.mustache.html") Mustache.render(template, :uploads => @uploads, :travis_id => ENV['TRAVIS_JOB_ID']) end |