Class: Gipper::Quiz
- Inherits:
-
Object
- Object
- Gipper::Quiz
- Defined in:
- lib/quiz.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
Instance Method Details
#iterate_through(questions) ⇒ Object
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/quiz.rb', line 20 def iterate_through questions questions.gsub!(/^\s*\/\/.*$/, "") # strip out comment lines list = questions.split(/[\r\n][\r\n\t\s]*[\r\n]/) list.each do |item| if item != '' yield item end end end |