Class: ElderScrollsLegends::Card
- Inherits:
-
Object
- Object
- ElderScrollsLegends::Card
- Includes:
- CardRepresenter, Roar::JSON
- Defined in:
- lib/elder_scrolls_legends_sdk/card.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
Returns the value of attribute attributes.
-
#collectible ⇒ Object
Returns the value of attribute collectible.
-
#cost ⇒ Object
Returns the value of attribute cost.
-
#health ⇒ Object
Returns the value of attribute health.
-
#id ⇒ Object
Returns the value of attribute id.
-
#image_url ⇒ Object
Returns the value of attribute image_url.
-
#keywords ⇒ Object
Returns the value of attribute keywords.
-
#name ⇒ Object
Returns the value of attribute name.
-
#power ⇒ Object
Returns the value of attribute power.
-
#rarity ⇒ Object
Returns the value of attribute rarity.
-
#set ⇒ Object
Returns the value of attribute set.
-
#soul_summon ⇒ Object
Returns the value of attribute soul_summon.
-
#soul_trap ⇒ Object
Returns the value of attribute soul_trap.
-
#subtypes ⇒ Object
Returns the value of attribute subtypes.
-
#text ⇒ Object
Returns the value of attribute text.
-
#type ⇒ Object
Returns the value of attribute type.
-
#unique ⇒ Object
Returns the value of attribute unique.
Class Method Summary collapse
-
.all ⇒ Array<Card>
Get all cards from a query by paging through data.
-
.find(id) ⇒ Card
Find a single card by the card id.
-
.Resource ⇒ String
Get the resource string.
-
.where(args) ⇒ Array<Card>
Adds a parameter to the hash of query parameters.
Instance Method Summary collapse
-
#initialize ⇒ Card
constructor
A new instance of Card.
Constructor Details
#initialize ⇒ Card
Returns a new instance of Card.
12 13 14 15 16 |
# File 'lib/elder_scrolls_legends_sdk/card.rb', line 12 def initialize @subtypes = [] @keywords = [] @attributes = [] end |
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
8 9 10 |
# File 'lib/elder_scrolls_legends_sdk/card.rb', line 8 def attributes @attributes end |
#collectible ⇒ Object
Returns the value of attribute collectible.
8 9 10 |
# File 'lib/elder_scrolls_legends_sdk/card.rb', line 8 def collectible @collectible end |
#cost ⇒ Object
Returns the value of attribute cost.
8 9 10 |
# File 'lib/elder_scrolls_legends_sdk/card.rb', line 8 def cost @cost end |
#health ⇒ Object
Returns the value of attribute health.
8 9 10 |
# File 'lib/elder_scrolls_legends_sdk/card.rb', line 8 def health @health end |
#id ⇒ Object
Returns the value of attribute id.
8 9 10 |
# File 'lib/elder_scrolls_legends_sdk/card.rb', line 8 def id @id end |
#image_url ⇒ Object
Returns the value of attribute image_url.
8 9 10 |
# File 'lib/elder_scrolls_legends_sdk/card.rb', line 8 def image_url @image_url end |
#keywords ⇒ Object
Returns the value of attribute keywords.
8 9 10 |
# File 'lib/elder_scrolls_legends_sdk/card.rb', line 8 def keywords @keywords end |
#name ⇒ Object
Returns the value of attribute name.
8 9 10 |
# File 'lib/elder_scrolls_legends_sdk/card.rb', line 8 def name @name end |
#power ⇒ Object
Returns the value of attribute power.
8 9 10 |
# File 'lib/elder_scrolls_legends_sdk/card.rb', line 8 def power @power end |
#rarity ⇒ Object
Returns the value of attribute rarity.
8 9 10 |
# File 'lib/elder_scrolls_legends_sdk/card.rb', line 8 def rarity @rarity end |
#set ⇒ Object
Returns the value of attribute set.
8 9 10 |
# File 'lib/elder_scrolls_legends_sdk/card.rb', line 8 def set @set end |
#soul_summon ⇒ Object
Returns the value of attribute soul_summon.
8 9 10 |
# File 'lib/elder_scrolls_legends_sdk/card.rb', line 8 def soul_summon @soul_summon end |
#soul_trap ⇒ Object
Returns the value of attribute soul_trap.
8 9 10 |
# File 'lib/elder_scrolls_legends_sdk/card.rb', line 8 def soul_trap @soul_trap end |
#subtypes ⇒ Object
Returns the value of attribute subtypes.
8 9 10 |
# File 'lib/elder_scrolls_legends_sdk/card.rb', line 8 def subtypes @subtypes end |
#text ⇒ Object
Returns the value of attribute text.
8 9 10 |
# File 'lib/elder_scrolls_legends_sdk/card.rb', line 8 def text @text end |
#type ⇒ Object
Returns the value of attribute type.
8 9 10 |
# File 'lib/elder_scrolls_legends_sdk/card.rb', line 8 def type @type end |
#unique ⇒ Object
Returns the value of attribute unique.
8 9 10 |
# File 'lib/elder_scrolls_legends_sdk/card.rb', line 8 def unique @unique end |
Class Method Details
.all ⇒ Array<Card>
Get all cards from a query by paging through data
36 37 38 |
# File 'lib/elder_scrolls_legends_sdk/card.rb', line 36 def self.all QueryBuilder.new(Card).all end |
.find(id) ⇒ Card
Find a single card by the card id
29 30 31 |
# File 'lib/elder_scrolls_legends_sdk/card.rb', line 29 def self.find(id) QueryBuilder.new(Card).find(id) end |
.Resource ⇒ String
Get the resource string
21 22 23 |
# File 'lib/elder_scrolls_legends_sdk/card.rb', line 21 def self.Resource "cards" end |
.where(args) ⇒ Array<Card>
Adds a parameter to the hash of query parameters
44 45 46 |
# File 'lib/elder_scrolls_legends_sdk/card.rb', line 44 def self.where(args) QueryBuilder.new(Card).where(args) end |