Returning result in Ruby

Below part of the code for fizzbuzz.rb is already implemented. Your task
is to produce the code for the doFizzBuzz() method. This method displays
the sequence of numbers and FizzBuzz where applicable. The result should
be stored in :tmp, as this is used by codemarker to pass the test.

class FizzBuzz
attr_accessor :tmp

def initialize temp
@tmp = temp
end

def doFizzBuzz

     # YOUR CODE GOES HERE!

     end

end

fb = FizzBuzz.new("")
fb.doFizzBuzz
puts fb.tmp

deee el wrote in post #1052420:

Below part of the code for fizzbuzz.rb is already implemented. Your task
is to produce the code for the doFizzBuzz() method. This method displays
the sequence of numbers and FizzBuzz where applicable. The result should
be stored in :tmp, as this is used by codemarker to pass the test.

This is not http://www.rubyquiz.com/ - and even for that the problem
description is completely insufficient.

Cheers

robert

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs