Class: CiInACan::ViewModels::TestResultViewModel
- Defined in:
- lib/ci_in_a_can/view_models/test_result_view_model.rb
Instance Method Summary collapse
Methods inherited from ViewModel
#initialize, #method_missing, #the_original_value
Constructor Details
This class inherits a constructor from CiInACan::ViewModels::ViewModel
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class CiInACan::ViewModels::ViewModel
Instance Method Details
#to_html ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/ci_in_a_can/view_models/test_result_view_model.rb', line 7 def to_html <<EOF <table class="table table-bordered"> <tbody> <tr> <td> Id </td> <td> #{id} </td> </tr> <tr> <td> Repo </td> <td> <a href="/repo/#{repo}"> #{repo} </a> </td> </tr> <tr> <td> Branch </td> <td> #{branch} </td> </tr> <tr> <td> Created At </td> <td> #{created_at.to_s} </td> </tr> <tr> <td> Passed </td> <td> #{passed ? 'Yes' : 'No'} </td> </tr> <tr> <td> Output </td> <td> #{output.to_s.gsub("\n", '<br />')} </td> </tr> </tbody> </table> EOF end |