Class: ZombieBattleground::Api::Models::Card
- Inherits:
-
Object
- Object
- ZombieBattleground::Api::Models::Card
- Includes:
- ActiveModel::Validations, ValidationHelper
- Defined in:
- lib/zombie_battleground/api/models/card.rb
Overview
Validator for Card
Instance Attribute Summary collapse
-
#ability ⇒ String
readonly
the Cards’s ability.
-
#block_height ⇒ Integer
readonly
the Cards’s block_height.
-
#cost ⇒ Integer
readonly
the Cards’s cost.
-
#damage ⇒ Integer
readonly
the Cards’s damage.
-
#description ⇒ String
readonly
the Cards’s description.
-
#flavor_text ⇒ String
readonly
the Cards’s flavor_text.
-
#frame ⇒ String
readonly
the Cards’s frame.
-
#health ⇒ Integer
readonly
the Cards’s health.
-
#id ⇒ Integer
readonly
the Cards’s id.
-
#image_url ⇒ String
readonly
the Cards’s image_url.
-
#kind ⇒ String
readonly
the Cards’s kind.
-
#mould_id ⇒ String
readonly
the Cards’s mould_id.
-
#name ⇒ String
readonly
the Cards’s name.
-
#picture ⇒ String
readonly
the Cards’s picture.
-
#rank ⇒ String
readonly
the Cards’s rank.
-
#rarity ⇒ String
readonly
the Cards’s rarity.
-
#set ⇒ String
readonly
the Cards’s set.
-
#type ⇒ String
readonly
the Cards’s type.
-
#version ⇒ String
readonly
the Cards’s version.
Instance Method Summary collapse
-
#initialize(card) ⇒ ZombieBattleground::Api::Card
constructor
Creates a new Card.
Constructor Details
#initialize(card) ⇒ ZombieBattleground::Api::Card
Creates a new Card
276 277 278 279 280 281 282 |
# File 'lib/zombie_battleground/api/models/card.rb', line 276 def initialize(card) card.each do |key, value| next if value.nil? # this is an illegal response, card id 1 is bogus instance_variable_set("@#{key}".to_sym, value) end end |
Instance Attribute Details
#ability ⇒ String (readonly)
the Cards’s ability
220 221 222 |
# File 'lib/zombie_battleground/api/models/card.rb', line 220 def ability @ability end |
#block_height ⇒ Integer (readonly)
the Cards’s block_height
232 233 234 |
# File 'lib/zombie_battleground/api/models/card.rb', line 232 def block_height @block_height end |
#cost ⇒ Integer (readonly)
the Cards’s cost
208 209 210 |
# File 'lib/zombie_battleground/api/models/card.rb', line 208 def cost @cost end |
#damage ⇒ Integer (readonly)
the Cards’s damage
184 185 186 |
# File 'lib/zombie_battleground/api/models/card.rb', line 184 def damage @damage end |
#description ⇒ String (readonly)
the Cards’s description
100 101 102 |
# File 'lib/zombie_battleground/api/models/card.rb', line 100 def description @description end |
#flavor_text ⇒ String (readonly)
the Cards’s flavor_text
112 113 114 |
# File 'lib/zombie_battleground/api/models/card.rb', line 112 def flavor_text @flavor_text end |
#frame ⇒ String (readonly)
the Cards’s frame
172 173 174 |
# File 'lib/zombie_battleground/api/models/card.rb', line 172 def frame @frame end |
#health ⇒ Integer (readonly)
the Cards’s health
196 197 198 |
# File 'lib/zombie_battleground/api/models/card.rb', line 196 def health @health end |
#id ⇒ Integer (readonly)
the Cards’s id
28 29 30 |
# File 'lib/zombie_battleground/api/models/card.rb', line 28 def id @id end |
#image_url ⇒ String (readonly)
the Cards’s image_url
244 245 246 |
# File 'lib/zombie_battleground/api/models/card.rb', line 244 def image_url @image_url end |
#kind ⇒ String (readonly)
the Cards’s kind
64 65 66 |
# File 'lib/zombie_battleground/api/models/card.rb', line 64 def kind @kind end |
#mould_id ⇒ String (readonly)
the Cards’s mould_id
40 41 42 |
# File 'lib/zombie_battleground/api/models/card.rb', line 40 def mould_id @mould_id end |
#name ⇒ String (readonly)
the Cards’s name
88 89 90 |
# File 'lib/zombie_battleground/api/models/card.rb', line 88 def name @name end |
#picture ⇒ String (readonly)
the Cards’s picture
124 125 126 |
# File 'lib/zombie_battleground/api/models/card.rb', line 124 def picture @picture end |
#rank ⇒ String (readonly)
the Cards’s rank
136 137 138 |
# File 'lib/zombie_battleground/api/models/card.rb', line 136 def rank @rank end |
#rarity ⇒ String (readonly)
the Cards’s rarity
160 161 162 |
# File 'lib/zombie_battleground/api/models/card.rb', line 160 def rarity @rarity end |
#set ⇒ String (readonly)
the Cards’s set
76 77 78 |
# File 'lib/zombie_battleground/api/models/card.rb', line 76 def set @set end |
#type ⇒ String (readonly)
the Cards’s type
148 149 150 |
# File 'lib/zombie_battleground/api/models/card.rb', line 148 def type @type end |
#version ⇒ String (readonly)
the Cards’s version
52 53 54 |
# File 'lib/zombie_battleground/api/models/card.rb', line 52 def version @version end |