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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c840aafc6b2438930b5551b66ced6b49e51fcc536dc910de925dd9a86a0536b4
4
- data.tar.gz: 7f0aefc6939c85c3ca2b462cef9706572d8c4d06212a29ca958e95478d06bcb4
3
+ metadata.gz: 32f5c1ba7401ca32fbb3c8f991757e83c64179308507e755fc152a7bc83bb478
4
+ data.tar.gz: bb5cb90088d2b316e17083c3bab30720f1226b70882a0fc21e2075e14e433bf1
5
5
  SHA512:
6
- metadata.gz: a818782e6479b3d6f58c5bba0e6c49badd51ab14eb167cb35b3615e2336bf7353d188565686520f9c05221da4f77e9418f4c150c7d0c550eb89a5636f16c0b14
7
- data.tar.gz: a43cdd07f6908f34ef4ca6feda0b03726e48a6027be46fb903e603b4a965f6f089842d331c7d76856eac4873fed01e6db2d6af7a0d3322a75d4dbdeb8ee7e709
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)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module HeadMusic
4
- VERSION = '0.24.4'
4
+ VERSION = '0.24.5'
5
5
  end
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
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-08 00:00:00.000000000 Z
11
+ date: 2020-08-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport