Class: Fitting::Report::Prefix
- Inherits:
-
Object
- Object
- Fitting::Report::Prefix
- Defined in:
- lib/fitting/report/prefix.rb
Instance Method Summary collapse
- #actions ⇒ Object
- #add_test(test) ⇒ Object
- #details ⇒ Object
-
#initialize(name, tomogram_json_path, skip = false) ⇒ Prefix
constructor
A new instance of Prefix.
- #name ⇒ Object
- #skip? ⇒ Boolean
- #tests ⇒ Object
Constructor Details
#initialize(name, tomogram_json_path, skip = false) ⇒ Prefix
Returns a new instance of Prefix.
6 7 8 9 10 11 12 13 14 |
# File 'lib/fitting/report/prefix.rb', line 6 def initialize(name, tomogram_json_path, skip = false) @name = name @tomogram_json_path = tomogram_json_path @tests = Fitting::Report::Tests.new([]) @skip = skip unless skip @actions = Fitting::Report::Actions.new(name, tomogram_json_path) end end |
Instance Method Details
#actions ⇒ Object
28 29 30 |
# File 'lib/fitting/report/prefix.rb', line 28 def actions @actions end |
#add_test(test) ⇒ Object
48 49 50 |
# File 'lib/fitting/report/prefix.rb', line 48 def add_test(test) @tests.push(test) end |
#details ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/fitting/report/prefix.rb', line 32 def details if @skip { name: @name, tests_size: @tests.size, actions: {tests_without_actions: [], actions_details: []} } else { name: @name, tests_size: @tests.size, actions: @actions.details(self) } end end |
#name ⇒ Object
16 17 18 |
# File 'lib/fitting/report/prefix.rb', line 16 def name @name end |
#skip? ⇒ Boolean
24 25 26 |
# File 'lib/fitting/report/prefix.rb', line 24 def skip? @skip end |
#tests ⇒ Object
20 21 22 |
# File 'lib/fitting/report/prefix.rb', line 20 def tests @tests end |