Class: Skunk::Generator::Html::FileData
- Inherits:
-
Object
- Object
- Skunk::Generator::Html::FileData
- Defined in:
- lib/skunk/generators/html/file_data.rb
Overview
Data object for individual file information in the HTML overview report
Instance Attribute Summary collapse
-
#churn ⇒ Object
readonly
Returns the value of attribute churn.
-
#churn_times_cost ⇒ Object
readonly
Returns the value of attribute churn_times_cost.
-
#cost ⇒ Object
readonly
Returns the value of attribute cost.
-
#coverage ⇒ Object
readonly
Returns the value of attribute coverage.
-
#file ⇒ Object
readonly
Returns the value of attribute file.
-
#skunk_score ⇒ Object
readonly
Returns the value of attribute skunk_score.
Instance Method Summary collapse
-
#initialize(module_data) ⇒ FileData
constructor
A new instance of FileData.
Constructor Details
#initialize(module_data) ⇒ FileData
Returns a new instance of FileData.
10 11 12 13 14 15 16 17 |
# File 'lib/skunk/generators/html/file_data.rb', line 10 def initialize(module_data) @file = PathTruncator.truncate(module_data.pathname) @skunk_score = module_data.skunk_score @churn_times_cost = module_data.churn_times_cost @churn = module_data.churn @cost = module_data.cost.round(2) @coverage = module_data.coverage.round(2) end |
Instance Attribute Details
#churn ⇒ Object (readonly)
Returns the value of attribute churn.
8 9 10 |
# File 'lib/skunk/generators/html/file_data.rb', line 8 def churn @churn end |
#churn_times_cost ⇒ Object (readonly)
Returns the value of attribute churn_times_cost.
8 9 10 |
# File 'lib/skunk/generators/html/file_data.rb', line 8 def churn_times_cost @churn_times_cost end |
#cost ⇒ Object (readonly)
Returns the value of attribute cost.
8 9 10 |
# File 'lib/skunk/generators/html/file_data.rb', line 8 def cost @cost end |
#coverage ⇒ Object (readonly)
Returns the value of attribute coverage.
8 9 10 |
# File 'lib/skunk/generators/html/file_data.rb', line 8 def coverage @coverage end |
#file ⇒ Object (readonly)
Returns the value of attribute file.
8 9 10 |
# File 'lib/skunk/generators/html/file_data.rb', line 8 def file @file end |
#skunk_score ⇒ Object (readonly)
Returns the value of attribute skunk_score.
8 9 10 |
# File 'lib/skunk/generators/html/file_data.rb', line 8 def skunk_score @skunk_score end |