Class: CiInACan::ViewModels::TestResultViewModel

Inherits:
ViewModel
  • Object
show all
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_htmlObject



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
"    <table class=\"table table-bordered\">\n<tbody>\n<tr>\n  <td>\n    Id\n  </td>\n  <td>\n    \#{id}\n  </td>\n</tr>\n<tr>\n  <td>\n    Repo\n  </td>\n  <td>\n    <a href=\"/repo/\#{repo}\">\n    \#{repo}\n    </a>\n  </td>\n</tr>\n<tr>\n  <td>\n    Branch\n  </td>\n  <td>\n    \#{branch}\n  </td>\n</tr>\n<tr>\n  <td>\n    Created At\n  </td>\n  <td>\n    \#{created_at.to_s}\n  </td>\n</tr>\n<tr>\n  <td>\n    Passed\n  </td>\n  <td>\n    \#{passed ? 'Yes' : 'No'}\n  </td>\n</tr>\n<tr>\n  <td>\n    Output\n  </td>\n  <td>\n    \#{output.to_s.gsub(\"\\n\", '<br />')}\n  </td>\n</tr>\n</tbody>\n    </table>\n"
end