Class: MetricAdapter::FlogAdapter
- Inherits:
-
Object
- Object
- MetricAdapter::FlogAdapter
- Defined in:
- lib/adapters/flog_adapter.rb
Instance Attribute Summary collapse
-
#flog ⇒ Object
readonly
Returns the value of attribute flog.
Instance Method Summary collapse
-
#initialize(flog) ⇒ FlogAdapter
constructor
A new instance of FlogAdapter.
- #metrics ⇒ Object
Constructor Details
#initialize(flog) ⇒ FlogAdapter
Returns a new instance of FlogAdapter.
5 6 7 |
# File 'lib/adapters/flog_adapter.rb', line 5 def initialize(flog) @flog = flog end |
Instance Attribute Details
#flog ⇒ Object (readonly)
Returns the value of attribute flog.
3 4 5 |
# File 'lib/adapters/flog_adapter.rb', line 3 def flog @flog end |
Instance Method Details
#metrics ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/adapters/flog_adapter.rb', line 9 def metrics metrics = [] flog.each_by_score do |signature, score| if locatable?(signature) metrics << create_metric(signature, score) end end metrics end |