a

Ruby code posted
created at 02 Jul 19:01

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 container
    if number == 1
      "bottle"
    else
      "bottles"
    end
  end
  # ...
end

class BottleNumber1 < BottleNumber
  def container
    if number == 1
      "bottle"
    else
      "bottles"
    end
  end
end
276 Bytes in 4 ms with coderay