head_music 0.24.4 → 0.24.5
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/instrument.rb +7 -0
- data/lib/head_music/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32f5c1ba7401ca32fbb3c8f991757e83c64179308507e755fc152a7bc83bb478
|
4
|
+
data.tar.gz: bb5cb90088d2b316e17083c3bab30720f1226b70882a0fc21e2075e14e433bf1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3dd06274ffffa0fbbd8adbb6340d22b27c6aeecc1ff237800145521b53db6230f25a41b30a862d25282bdcba01cb35b5e6f69390ccdd7492a80dcb84849550dc
|
7
|
+
data.tar.gz: 7e4abe930e7abe9b82a04220dcadff5691d2de531ba792c4d2a506c5f6afef16447288ea9de78ea0a32642f67ca69cb45714d9e121a689c2c44e7d56255de376
|
@@ -23,6 +23,12 @@ class HeadMusic::Instrument
|
|
23
23
|
to_s == other.to_s
|
24
24
|
end
|
25
25
|
|
26
|
+
def translation(locale = :en)
|
27
|
+
return name unless name_key
|
28
|
+
|
29
|
+
I18n.translate(name_key, scope: [:instruments], locale: locale)
|
30
|
+
end
|
31
|
+
|
26
32
|
private_class_method :new
|
27
33
|
|
28
34
|
private
|
@@ -55,6 +61,7 @@ class HeadMusic::Instrument
|
|
55
61
|
INSTRUMENTS.each do |name_key, data|
|
56
62
|
return data.merge!('name_key' => name_key) if name_key.to_s == key.to_s
|
57
63
|
end
|
64
|
+
nil
|
58
65
|
end
|
59
66
|
|
60
67
|
def initialize_data_from_record(record)
|
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.24.
|
4
|
+
version: 0.24.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rob Head
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-08-
|
11
|
+
date: 2020-08-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|