mtg 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -15,7 +15,7 @@ module MTG
15
15
  end
16
16
 
17
17
  def to_s(format = nil)
18
- if format.try(:short)
18
+ if format == :short
19
19
  {'common' => 'C', 'uncommon' => 'U', 'rare' => 'R', 'mythic rare' => 'MR'}[@name]
20
20
  else
21
21
  @name
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'mtg'
3
- s.version = '0.0.2'
3
+ s.version = '0.0.3'
4
4
  s.authors = ['Austin Schneider']
5
5
  s.email = "soccer022483@gmail.com"
6
6
  s.description = 'Objects such as cards, colors, mana costs, etc relating to the Magic, The Gathering trading card game.'
@@ -14,7 +14,7 @@ describe MTG::Card::Rarity do
14
14
  before { @r2 = MTG::Card::Rarity.new(name) }
15
15
 
16
16
  it("returns an instance") { @r2.should be_an_instance_of(MTG::Card::Rarity) }
17
- it("sets the name") { @r2.name.should == name }
17
+ it("sets the name") { @r2.to_s.should == name }
18
18
  end
19
19
  end
20
20
 
@@ -81,7 +81,7 @@ describe MTG::Card::Rarity do
81
81
 
82
82
  describe "#hash" do
83
83
  it "returns the name#hash" do
84
- @r.hash.should == @r.name.hash
84
+ @r.hash.should == @r.to_s.hash
85
85
  end
86
86
  end
87
87
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 2
9
- version: 0.0.2
8
+ - 3
9
+ version: 0.0.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Austin Schneider
@@ -44,7 +44,6 @@ files:
44
44
  - README
45
45
  - mtg.gemspec
46
46
  - LICENSE
47
- - mtg-0.0.1.gem
48
47
  - example.rb
49
48
  - lib/mtg/card/rarity.rb
50
49
  - lib/mtg/card/base.rb
Binary file