Class: Watchr::FlayMetric::DiffFactory
- Inherits:
-
Object
- Object
- Watchr::FlayMetric::DiffFactory
- Defined in:
- lib/watchr/metrics/flay/diff_factory.rb
Class Method Summary collapse
Class Method Details
.build(same, nodes, bonus, mass) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/watchr/metrics/flay/diff_factory.rb', line 4 def self.build(same, nodes, bonus, mass) diff = Diff.new(same, nodes, bonus, mass) nodes.each do |x| diff.add_location(Location.new(x.file, x.line)) end #r2r = Ruby2Ruby.new #diff.code = n_way_diff(*nodes.map { |s| r2r.process(s.deep_clone) }) diff end |