head_music 6.0.1 → 7.0.0

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: 64230af5264efb58e93a127cc3ad7528f9fd33f663b98ba117bb49d746e500ce
4
- data.tar.gz: c6c72eb473869b2aa01dc80f37d54787dda8816f0ac46404d365ee30431f6eab
3
+ metadata.gz: 5329e3d4233738556d545c62cf0c721f42f8736aa483f58b80a6812318af0aa7
4
+ data.tar.gz: 5267548a7f4be05a8a3cbd76354ac1d6cc501475c235b0b5626a725be7f136a1
5
5
  SHA512:
6
- metadata.gz: c049302d49e156b572c3dc0aeb8b9cf59db93ec77ca0e0636c4a64375e4c5648a886ec21ec3e63077981c938317841989df0825c153848aef45b16b13117df2a
7
- data.tar.gz: 4dddb70eeb88d7ae04f4184365c791d650731524c2d35c6a300b22227bc24fba921c9efa3d6fa9a0212a7a4f43e2680a0c0cdfbbcc580b11ea17bc9e39ebc4be
6
+ metadata.gz: 0d90ef9a5432dc7fe68584f6ecccf7b2441aaaf756f5c19555fed48e8bb1f68a5bf0bf124500189f7f4366d62b0901e8910f07e3ed2a7ba43a47e6dddbf9df61
7
+ data.tar.gz: c9787b84e779684e2a807ff9af4bdc4bc98a7eafda0512c1d1beb0c0ab9034a7c28b551983ca914f2b6b364ba968b696086762777c3d58682f76577f811daee0
data/.rubocop.yml CHANGED
@@ -25,5 +25,8 @@ RSpec/ContextWording:
25
25
  - for
26
26
  - by
27
27
 
28
+ RSpec/MultipleExpectations:
29
+ Enabled: false
30
+
28
31
  RSpec/NestedGroups:
29
32
  Max: 5
@@ -9,7 +9,7 @@ class HeadMusic::Consonance
9
9
 
10
10
  attr_reader :name
11
11
 
12
- delegate :to_s, to: :name
12
+ delegate :to_s, :to_sym, to: :name
13
13
 
14
14
  def initialize(name)
15
15
  @name = name.to_s.to_sym
@@ -46,7 +46,7 @@ class HeadMusic::Content::Composition
46
46
  end
47
47
 
48
48
  def latest_bar_number
49
- [voices.map(&:earliest_bar_number), 1].flatten.max
49
+ [voices.map(&:latest_bar_number), 1].flatten.max
50
50
  end
51
51
 
52
52
  def cantus_firmus_voice
@@ -58,7 +58,7 @@ class HeadMusic::Content::Composition
58
58
  end
59
59
 
60
60
  def to_s
61
- "#{name} — #{voices.count} voice(s)"
61
+ "#{name} — #{voices.count} #{voices.count == 1 ? 'voice' : 'voices'}"
62
62
  end
63
63
 
64
64
  private
@@ -71,6 +71,7 @@ class HeadMusic::Content::Composition
71
71
  end
72
72
 
73
73
  def last_meter_change(bar_number)
74
+ bar_number = [bar_number, earliest_bar_number].max
74
75
  bars(bar_number)[earliest_bar_number..bar_number].reverse.detect(&:meter)
75
76
  end
76
77
 
@@ -27,10 +27,6 @@ class HeadMusic::Content::Position
27
27
  [bar_number, count, tick_string].join(":")
28
28
  end
29
29
 
30
- def state
31
- [composition.name, code].join(" ")
32
- end
33
-
34
30
  def values
35
31
  [bar_number, count, tick]
36
32
  end