Class: Watchr::FlogReportMethod
- Inherits:
-
Object
- Object
- Watchr::FlogReportMethod
- Defined in:
- lib/watchr/metrics/flog/method.rb
Instance Attribute Summary collapse
-
#clazz ⇒ Object
readonly
Returns the value of attribute clazz.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#total_score ⇒ Object
readonly
Returns the value of attribute total_score.
Instance Method Summary collapse
- #full_name ⇒ Object (also: #name)
-
#initialize(clazz, name, score, location) ⇒ FlogReportMethod
constructor
A new instance of FlogReportMethod.
- #method_name ⇒ Object
Constructor Details
#initialize(clazz, name, score, location) ⇒ FlogReportMethod
Returns a new instance of FlogReportMethod.
5 6 7 8 9 10 11 |
# File 'lib/watchr/metrics/flog/method.rb', line 5 def initialize(clazz, name, score, location) @clazz = clazz @full_name = name @method_name = name.split(/#|::/).last @total_score = (10 * score).round / 10.0 @location = location end |
Instance Attribute Details
#clazz ⇒ Object (readonly)
Returns the value of attribute clazz.
3 4 5 |
# File 'lib/watchr/metrics/flog/method.rb', line 3 def clazz @clazz end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
3 4 5 |
# File 'lib/watchr/metrics/flog/method.rb', line 3 def location @location end |
#total_score ⇒ Object (readonly)
Returns the value of attribute total_score.
3 4 5 |
# File 'lib/watchr/metrics/flog/method.rb', line 3 def total_score @total_score end |
Instance Method Details
#full_name ⇒ Object Also known as: name
13 14 15 |
# File 'lib/watchr/metrics/flog/method.rb', line 13 def full_name @full_name end |
#method_name ⇒ Object
17 18 19 |
# File 'lib/watchr/metrics/flog/method.rb', line 17 def method_name @method_name end |