head_music 0.11.7 → 0.11.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/head_music/chord.rb +1 -1
- data/lib/head_music/style/annotation.rb +12 -0
- data/lib/head_music/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6be1575228b7a6ea778c74be5e1f0422732fa7e0
|
4
|
+
data.tar.gz: 5761e7ae91487307331c9f73487d6b91a1fdd8d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b754a036d18c02225ed9bef0e9a778f870adf265a39df3d612dbc67544631496883fe2cda40c5088bfaac58fe46df309e38e43037eb43c4b96258650ca82d49e
|
7
|
+
data.tar.gz: 4e7bb9461fbf78a833773d1cabcbbe0574e48087fde520f4f181aeafdb4ade491adcc463b79c2b384e50e437bf3e31a50d3ea2885314dea845e75f130075c843
|
data/lib/head_music/chord.rb
CHANGED
@@ -22,6 +22,18 @@ class HeadMusic::Style::Annotation
|
|
22
22
|
[marks].flatten.compact.map(&:fitness).reduce(1, :*)
|
23
23
|
end
|
24
24
|
|
25
|
+
def perfect?
|
26
|
+
fitness == 1
|
27
|
+
end
|
28
|
+
|
29
|
+
def start_position
|
30
|
+
[marks].flatten.compact.map(&:start_position).sort.first
|
31
|
+
end
|
32
|
+
|
33
|
+
def end_position
|
34
|
+
[marks].flatten.compact.map(&:end_position).sort.last
|
35
|
+
end
|
36
|
+
|
25
37
|
def marks
|
26
38
|
raise NotImplementedError
|
27
39
|
end
|
data/lib/head_music/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: head_music
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rob Head
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-05-
|
11
|
+
date: 2017-05-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|