Class: Gatherer::Printing

Inherits:
Object
  • Object
show all
Defined in:
lib/gatherer/printing.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes) ⇒ Printing

Returns a new instance of Printing.



5
6
7
8
9
# File 'lib/gatherer/printing.rb', line 5

def initialize(attributes)
  @expansion = attributes[:expansion]
  @rarity = attributes[:rarity]
  @number = attributes[:number]
end

Instance Attribute Details

#expansionObject (readonly)

Returns the value of attribute expansion.



3
4
5
# File 'lib/gatherer/printing.rb', line 3

def expansion
  @expansion
end

#numberObject (readonly)

Returns the value of attribute number.



3
4
5
# File 'lib/gatherer/printing.rb', line 3

def number
  @number
end

#rarityObject (readonly)

Returns the value of attribute rarity.



3
4
5
# File 'lib/gatherer/printing.rb', line 3

def rarity
  @rarity
end

Instance Method Details

#to_hashObject



11
12
13
14
15
16
17
# File 'lib/gatherer/printing.rb', line 11

def to_hash
  {
    expansion: @expansion.to_hash,
    rarity: @rarity,
    number: @number
  }
end