a

Ruby code posted
created at 02 Jul 18:15

Edit | Back
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
class BottleNumber
  # ...
  def quantity
    if number == 0
      "no more"
    else
      number.to_s
    end
  end
  # ...
end

class BottleNumber0 < BottleNumber
  def quantity
    if number == 0
      "no more"
    else
      number.to_s
    end
  end
end
280 Bytes in 4 ms with coderay