Class: Hearthstone::Models::Card

Inherits:
Object
  • Object
show all
Defined in:
lib/hearthstone/models/card.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#artistObject

Returns the value of attribute artist.



5
6
7
# File 'lib/hearthstone/models/card.rb', line 5

def artist
  @artist
end

#attackObject

Returns the value of attribute attack.



5
6
7
# File 'lib/hearthstone/models/card.rb', line 5

def attack
  @attack
end

#collectibleObject

Returns the value of attribute collectible.



5
6
7
# File 'lib/hearthstone/models/card.rb', line 5

def collectible
  @collectible
end

#costObject

Returns the value of attribute cost.



4
5
6
# File 'lib/hearthstone/models/card.rb', line 4

def cost
  @cost
end

#eliteObject

Returns the value of attribute elite.



5
6
7
# File 'lib/hearthstone/models/card.rb', line 5

def elite
  @elite
end

#factionObject

Returns the value of attribute faction.



4
5
6
# File 'lib/hearthstone/models/card.rb', line 4

def faction
  @faction
end

#flavorObject

Returns the value of attribute flavor.



4
5
6
# File 'lib/hearthstone/models/card.rb', line 4

def flavor
  @flavor
end

#healthObject

Returns the value of attribute health.



5
6
7
# File 'lib/hearthstone/models/card.rb', line 5

def health
  @health
end

#idObject

Returns the value of attribute id.



5
6
7
# File 'lib/hearthstone/models/card.rb', line 5

def id
  @id
end

#mechanicsObject

Returns the value of attribute mechanics.



4
5
6
# File 'lib/hearthstone/models/card.rb', line 4

def mechanics
  @mechanics
end

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/hearthstone/models/card.rb', line 4

def name
  @name
end

#rarityObject

Returns the value of attribute rarity.



4
5
6
# File 'lib/hearthstone/models/card.rb', line 4

def rarity
  @rarity
end

#textObject

Returns the value of attribute text.



4
5
6
# File 'lib/hearthstone/models/card.rb', line 4

def text
  @text
end

#typeObject

Returns the value of attribute type.



4
5
6
# File 'lib/hearthstone/models/card.rb', line 4

def type
  @type
end

Instance Method Details

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/hearthstone/models/card.rb', line 7

def eql?(other)
  other.equal?(id) || id == other.id
end

#hashObject



11
12
13
# File 'lib/hearthstone/models/card.rb', line 11

def hash
  id.hash
end

#to_sObject



15
16
17
# File 'lib/hearthstone/models/card.rb', line 15

def to_s
  "<Card \"#{name}\">"
end