Class: MTG::Card
- Inherits:
-
Object
- Object
- MTG::Card
- Includes:
- CardRepresenter, Roar::JSON
- Defined in:
- lib/mtg_sdk/card.rb
Instance Attribute Summary collapse
-
#artist ⇒ Object
Returns the value of attribute artist.
-
#border ⇒ Object
Returns the value of attribute border.
-
#cmc ⇒ Object
Returns the value of attribute cmc.
-
#color_identity ⇒ Object
Returns the value of attribute color_identity.
-
#colors ⇒ Object
Returns the value of attribute colors.
-
#flavor ⇒ Object
Returns the value of attribute flavor.
-
#foreign_names ⇒ Object
Returns the value of attribute foreign_names.
-
#hand ⇒ Object
Returns the value of attribute hand.
-
#id ⇒ Object
Returns the value of attribute id.
-
#image_url ⇒ Object
Returns the value of attribute image_url.
-
#layout ⇒ Object
Returns the value of attribute layout.
-
#legalities ⇒ Object
Returns the value of attribute legalities.
-
#life ⇒ Object
Returns the value of attribute life.
-
#loyalty ⇒ Object
Returns the value of attribute loyalty.
-
#mana_cost ⇒ Object
Returns the value of attribute mana_cost.
-
#multiverse_id ⇒ Object
Returns the value of attribute multiverse_id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#names ⇒ Object
Returns the value of attribute names.
-
#number ⇒ Object
Returns the value of attribute number.
-
#original_text ⇒ Object
Returns the value of attribute original_text.
-
#original_type ⇒ Object
Returns the value of attribute original_type.
-
#power ⇒ Object
Returns the value of attribute power.
-
#printings ⇒ Object
Returns the value of attribute printings.
-
#rarity ⇒ Object
Returns the value of attribute rarity.
-
#release_date ⇒ Object
Returns the value of attribute release_date.
-
#reserved ⇒ Object
Returns the value of attribute reserved.
-
#rulings ⇒ Object
Returns the value of attribute rulings.
-
#set ⇒ Object
Returns the value of attribute set.
-
#set_name ⇒ Object
Returns the value of attribute set_name.
-
#source ⇒ Object
Returns the value of attribute source.
-
#starter ⇒ Object
Returns the value of attribute starter.
-
#subtypes ⇒ Object
Returns the value of attribute subtypes.
-
#supertypes ⇒ Object
Returns the value of attribute supertypes.
-
#text ⇒ Object
Returns the value of attribute text.
-
#timeshifted ⇒ Object
Returns the value of attribute timeshifted.
-
#toughness ⇒ Object
Returns the value of attribute toughness.
-
#type ⇒ Object
Returns the value of attribute type.
-
#types ⇒ Object
Returns the value of attribute types.
-
#variations ⇒ Object
Returns the value of attribute variations.
-
#watermark ⇒ Object
Returns the value of attribute watermark.
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 multiverse id.
-
.Resource ⇒ String
Get the resource string.
-
.where(args) ⇒ QueryBuilder
Adds a parameter to the hash of query parameters.
Instance Attribute Details
#artist ⇒ Object
Returns the value of attribute artist.
8 9 10 |
# File 'lib/mtg_sdk/card.rb', line 8 def artist @artist end |
#border ⇒ Object
Returns the value of attribute border.
8 9 10 |
# File 'lib/mtg_sdk/card.rb', line 8 def border @border end |
#cmc ⇒ Object
Returns the value of attribute cmc.
8 9 10 |
# File 'lib/mtg_sdk/card.rb', line 8 def cmc @cmc end |
#color_identity ⇒ Object
Returns the value of attribute color_identity.
8 9 10 |
# File 'lib/mtg_sdk/card.rb', line 8 def color_identity @color_identity end |
#colors ⇒ Object
Returns the value of attribute colors.
8 9 10 |
# File 'lib/mtg_sdk/card.rb', line 8 def colors @colors end |
#flavor ⇒ Object
Returns the value of attribute flavor.
8 9 10 |
# File 'lib/mtg_sdk/card.rb', line 8 def flavor @flavor end |
#foreign_names ⇒ Object
Returns the value of attribute foreign_names.
8 9 10 |
# File 'lib/mtg_sdk/card.rb', line 8 def foreign_names @foreign_names end |
#hand ⇒ Object
Returns the value of attribute hand.
8 9 10 |
# File 'lib/mtg_sdk/card.rb', line 8 def hand @hand end |
#id ⇒ Object
Returns the value of attribute id.
8 9 10 |
# File 'lib/mtg_sdk/card.rb', line 8 def id @id end |
#image_url ⇒ Object
Returns the value of attribute image_url.
8 9 10 |
# File 'lib/mtg_sdk/card.rb', line 8 def image_url @image_url end |
#layout ⇒ Object
Returns the value of attribute layout.
8 9 10 |
# File 'lib/mtg_sdk/card.rb', line 8 def layout @layout end |
#legalities ⇒ Object
Returns the value of attribute legalities.
8 9 10 |
# File 'lib/mtg_sdk/card.rb', line 8 def legalities @legalities end |
#life ⇒ Object
Returns the value of attribute life.
8 9 10 |
# File 'lib/mtg_sdk/card.rb', line 8 def life @life end |
#loyalty ⇒ Object
Returns the value of attribute loyalty.
8 9 10 |
# File 'lib/mtg_sdk/card.rb', line 8 def loyalty @loyalty end |
#mana_cost ⇒ Object
Returns the value of attribute mana_cost.
8 9 10 |
# File 'lib/mtg_sdk/card.rb', line 8 def mana_cost @mana_cost end |
#multiverse_id ⇒ Object
Returns the value of attribute multiverse_id.
8 9 10 |
# File 'lib/mtg_sdk/card.rb', line 8 def multiverse_id @multiverse_id end |
#name ⇒ Object
Returns the value of attribute name.
8 9 10 |
# File 'lib/mtg_sdk/card.rb', line 8 def name @name end |
#names ⇒ Object
Returns the value of attribute names.
8 9 10 |
# File 'lib/mtg_sdk/card.rb', line 8 def names @names end |
#number ⇒ Object
Returns the value of attribute number.
8 9 10 |
# File 'lib/mtg_sdk/card.rb', line 8 def number @number end |
#original_text ⇒ Object
Returns the value of attribute original_text.
8 9 10 |
# File 'lib/mtg_sdk/card.rb', line 8 def original_text @original_text end |
#original_type ⇒ Object
Returns the value of attribute original_type.
8 9 10 |
# File 'lib/mtg_sdk/card.rb', line 8 def original_type @original_type end |
#power ⇒ Object
Returns the value of attribute power.
8 9 10 |
# File 'lib/mtg_sdk/card.rb', line 8 def power @power end |
#printings ⇒ Object
Returns the value of attribute printings.
8 9 10 |
# File 'lib/mtg_sdk/card.rb', line 8 def printings @printings end |
#rarity ⇒ Object
Returns the value of attribute rarity.
8 9 10 |
# File 'lib/mtg_sdk/card.rb', line 8 def rarity @rarity end |
#release_date ⇒ Object
Returns the value of attribute release_date.
8 9 10 |
# File 'lib/mtg_sdk/card.rb', line 8 def release_date @release_date end |
#reserved ⇒ Object
Returns the value of attribute reserved.
8 9 10 |
# File 'lib/mtg_sdk/card.rb', line 8 def reserved @reserved end |
#rulings ⇒ Object
Returns the value of attribute rulings.
8 9 10 |
# File 'lib/mtg_sdk/card.rb', line 8 def rulings @rulings end |
#set ⇒ Object
Returns the value of attribute set.
8 9 10 |
# File 'lib/mtg_sdk/card.rb', line 8 def set @set end |
#set_name ⇒ Object
Returns the value of attribute set_name.
8 9 10 |
# File 'lib/mtg_sdk/card.rb', line 8 def set_name @set_name end |
#source ⇒ Object
Returns the value of attribute source.
8 9 10 |
# File 'lib/mtg_sdk/card.rb', line 8 def source @source end |
#starter ⇒ Object
Returns the value of attribute starter.
8 9 10 |
# File 'lib/mtg_sdk/card.rb', line 8 def starter @starter end |
#subtypes ⇒ Object
Returns the value of attribute subtypes.
8 9 10 |
# File 'lib/mtg_sdk/card.rb', line 8 def subtypes @subtypes end |
#supertypes ⇒ Object
Returns the value of attribute supertypes.
8 9 10 |
# File 'lib/mtg_sdk/card.rb', line 8 def supertypes @supertypes end |
#text ⇒ Object
Returns the value of attribute text.
8 9 10 |
# File 'lib/mtg_sdk/card.rb', line 8 def text @text end |
#timeshifted ⇒ Object
Returns the value of attribute timeshifted.
8 9 10 |
# File 'lib/mtg_sdk/card.rb', line 8 def timeshifted @timeshifted end |
#toughness ⇒ Object
Returns the value of attribute toughness.
8 9 10 |
# File 'lib/mtg_sdk/card.rb', line 8 def toughness @toughness end |
#type ⇒ Object
Returns the value of attribute type.
8 9 10 |
# File 'lib/mtg_sdk/card.rb', line 8 def type @type end |
#types ⇒ Object
Returns the value of attribute types.
8 9 10 |
# File 'lib/mtg_sdk/card.rb', line 8 def types @types end |
#variations ⇒ Object
Returns the value of attribute variations.
8 9 10 |
# File 'lib/mtg_sdk/card.rb', line 8 def variations @variations end |
#watermark ⇒ Object
Returns the value of attribute watermark.
8 9 10 |
# File 'lib/mtg_sdk/card.rb', line 8 def watermark @watermark end |
Class Method Details
.all ⇒ Array<Card>
Get all cards from a query by paging through data
32 33 34 |
# File 'lib/mtg_sdk/card.rb', line 32 def self.all QueryBuilder.new(Card).all end |
.find(id) ⇒ Card
Find a single card by the card multiverse id
25 26 27 |
# File 'lib/mtg_sdk/card.rb', line 25 def self.find(id) QueryBuilder.new(Card).find(id) end |
.Resource ⇒ String
Get the resource string
17 18 19 |
# File 'lib/mtg_sdk/card.rb', line 17 def self.Resource "cards" end |
.where(args) ⇒ QueryBuilder
Adds a parameter to the hash of query parameters
40 41 42 |
# File 'lib/mtg_sdk/card.rb', line 40 def self.where(args) QueryBuilder.new(Card).where(args) end |