class Dropdown

Constants

Attributes

choices[RW]

Public Class Methods

new(opts={}) click to toggle source
Calls superclass method Question::new
# File lib/ruql/dropdown.rb, line 15
def initialize(opts={})
  super
  self.choices = []
end

Public Instance Methods

choice(correct, list) click to toggle source
# File lib/ruql/dropdown.rb, line 6
def choice(correct, list)
  @choices << DropdownChoice.new(correct, list)
end
label(str) click to toggle source
# File lib/ruql/dropdown.rb, line 9
def label(str)
  @choices << DropdownChoice.new(0, [str])
end