lib/head_music/style/mark.rb in head_music-0.20.0 vs lib/head_music/style/mark.rb in head_music-0.22.0

- old
+ new

@@ -10,11 +10,12 @@ end def self.for_all(placements, fitness: nil) placements = [placements].flatten.compact return [] if placements.empty? - start_position = placements.map(&:position).sort.first - end_position = placements.map(&:next_position).sort.last + + start_position = placements.map(&:position).min + end_position = placements.map(&:next_position).max new(start_position, end_position, placements: placements, fitness: fitness) end def self.for_each(placements, fitness: nil) placements = [placements].flatten