Class: Array
Instance Method Summary collapse
Instance Method Details
#heights ⇒ Object
39 40 41 |
# File 'lib/cards/extensions.rb', line 39 def heights map {|c| c.height} end |
#sum ⇒ Object
29 30 31 32 33 |
# File 'lib/cards/extensions.rb', line 29 def sum s = 0 each {|i| s += i} s end |
#widths ⇒ Object
35 36 37 |
# File 'lib/cards/extensions.rb', line 35 def widths map {|c| c.width} end |