head_music 5.0.0 → 6.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4225259e4cfbb1eac6257f4840b10731b58d1a09b52b87677e00522fdb2a7351
4
- data.tar.gz: 92e620b782cb6a7e424e97b98d7eeb50b130b11f11293b494274dc382a0ac62d
3
+ metadata.gz: 64230af5264efb58e93a127cc3ad7528f9fd33f663b98ba117bb49d746e500ce
4
+ data.tar.gz: c6c72eb473869b2aa01dc80f37d54787dda8816f0ac46404d365ee30431f6eab
5
5
  SHA512:
6
- metadata.gz: 7a41a9bf9e1e724990819ad1f9ed93889a5433f80407426250d7cef27248d69155f46db4838fd7cfd99b5bdeb680b40ce5a8c00acdcffd76a1260dbe7ce300c6
7
- data.tar.gz: 1b6053743fb591e4cf8428faf09732ce2ab1c271cc37759b732cf36fb9b6021adc26ec4c444312beb98d01c3d68ecdb9db97b13efa8dc9c8040f5b31f35b9973
6
+ metadata.gz: c049302d49e156b572c3dc0aeb8b9cf59db93ec77ca0e0636c4a64375e4c5648a886ec21ec3e63077981c938317841989df0825c153848aef45b16b13117df2a
7
+ data.tar.gz: 4dddb70eeb88d7ae04f4184365c791d650731524c2d35c6a300b22227bc24fba921c9efa3d6fa9a0212a7a4f43e2680a0c0cdfbbcc580b11ea17bc9e39ebc4be
data/.rubocop.yml CHANGED
@@ -26,4 +26,4 @@ RSpec/ContextWording:
26
26
  - by
27
27
 
28
28
  RSpec/NestedGroups:
29
- Max: 4
29
+ Max: 5
@@ -105,7 +105,9 @@ class HeadMusic::Content::Voice
105
105
  end
106
106
 
107
107
  def to_s
108
- "#{role}: #{pitches.first(10).map(&:to_s)}"
108
+ return pitches_string if role.to_s.strip == ""
109
+
110
+ [role, pitches_string].join(": ")
109
111
  end
110
112
 
111
113
  private
@@ -114,4 +116,8 @@ class HeadMusic::Content::Voice
114
116
  @placements << placement
115
117
  @placements = @placements.sort
116
118
  end
119
+
120
+ def pitches_string
121
+ pitches.first(10).map(&:to_s).join(" ")
122
+ end
117
123
  end