babymetal 0.1.3 → 0.1.4

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
  SHA1:
3
- metadata.gz: 0ea8585b330450658cf3ad433fd64be82ed9a1dc
4
- data.tar.gz: aaa41ecfeda975e56748c3e02f4f41b34407cd69
3
+ metadata.gz: a4ecebbc60f56c0508f718edd9edd5e757f56f28
4
+ data.tar.gz: 5907ed706ba821a9f74698f2fb9ebbc0be4d8209
5
5
  SHA512:
6
- metadata.gz: 45fcf1bc021d4234948bb7349463a1ce4078149c73a3d916a52a7b961c33d76b16e240943deef394ff4c296ff1d9d17104a78e5516ec5deb7a19214924e2dfab
7
- data.tar.gz: 7030530146f509d3fd4b8487380a2c342a7378148ede1b06ae3d5f1b4ed32e19f49d88a4b76af121783f6793e04bfef450c29848dacbbd2917826a6c637a28f7
6
+ metadata.gz: 03a3bfad6dfb0f46d150fcbd4a41f6d4c6b4debf03c856ee1e3c1aea745a2527dd11e42f8352093a84f49dc631e230dd2e75e960a02cd4708d973ace95c6077a
7
+ data.tar.gz: 591ebfbbf4ba12cfa02a727ffff4499802b66a804bafee73dec69aad5e62427bd21e72fdb2ad5f123e01a9f10f4381d81fc48cb34562b1d3a84f068fe21ae400
data/README.md CHANGED
@@ -29,9 +29,9 @@ Babymetal::facebook
29
29
  Babymetal::instagram
30
30
  Babymetal::twitter
31
31
 
32
- su_metal = Babymetal::Su_metal.new
33
- yui_metal = Babymetal::Yui_metal.new
34
- moa_metal = Babymetal::Moa_metal.new
32
+ su_metal = Babymetal::SuMetal.new
33
+ yui_metal = Babymetal::YuiMetal.new
34
+ moa_metal = Babymetal::MoaMetal.new
35
35
 
36
36
  su_metal.metal_name # SU-METAL
37
37
  su_metal.first_name_ja # すず香
@@ -1,36 +1,34 @@
1
1
  require "date"
2
2
  module Babymetal
3
3
  class Member
4
- @@properties = [
5
- :metal_name,
6
- :first_name_ja,
7
- :family_name_ja,
8
- :name_ja,
9
- :first_name_en,
10
- :family_name_en,
11
- :name_en,
12
- :birthday,
13
- :blood_type,
14
- :hometown,
15
- ]
4
+ PROPERTIES = %i(
5
+ metal_name
6
+ first_name_ja
7
+ family_name_ja
8
+ name_ja
9
+ first_name_en
10
+ family_name_en
11
+ name_en
12
+ birthday
13
+ blood_type
14
+ hometown
15
+ )
16
16
 
17
- @@properties.each do |prop|
18
- attr_accessor prop
19
- end
17
+ attr_accessor *PROPERTIES
20
18
 
21
19
  def initialize(hash = self.info)
22
20
  self.send('name_ja' + '=', "#{hash[:family_name_ja]} #{hash[:first_name_ja]}")
23
21
  self.send('name_en' + '=', "#{hash[:first_name_en]} #{hash[:family_name_en]}")
24
22
  hash.each do |key, value|
25
- if @@properties.member? key.to_sym
26
- self.send((key.to_s + '=').to_s, value)
23
+ if PROPERTIES.member? key.to_sym
24
+ self.send(key.to_s + '=', value)
27
25
  end
28
26
  end
29
27
  end
30
28
 
31
29
  def info
32
30
  {
33
- :metal_name => 'We are BABYMETAL',
31
+ metal_name: 'We are BABYMETAL',
34
32
  }
35
33
  end
36
34
 
@@ -1,6 +1,6 @@
1
1
  require "Babymetal/Member"
2
2
  module Babymetal
3
- class Moa_metal < Babymetal::Member
3
+ class MoaMetal < Babymetal::Member
4
4
  def info
5
5
  {
6
6
  :metal_name => 'MOAMETAL',
@@ -1,6 +1,6 @@
1
1
  require "Babymetal/Member"
2
2
  module Babymetal
3
- class Su_metal < Babymetal::Member
3
+ class SuMetal < Babymetal::Member
4
4
  def info
5
5
  {
6
6
  :metal_name => 'SU-METAL',
@@ -1,3 +1,3 @@
1
1
  module Babymetal
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
@@ -1,6 +1,6 @@
1
1
  require "Babymetal/Member"
2
2
  module Babymetal
3
- class Yui_metal < Babymetal::Member
3
+ class YuiMetal < Babymetal::Member
4
4
  def info
5
5
  {
6
6
  :metal_name => 'YUIMETAL',
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: babymetal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hondallica