class BBS::Flow::Steps::Options
The receiver of a Flow#menu block.
Attributes
The options so far.
Public Class Methods
Source
# File lib/bbs/flow/questions.rb, line 103 def self.collect(&) options = new options.instance_eval(&) options.list end
The options of the block: an Array of [label, steps].
Source
# File lib/bbs/flow/questions.rb, line 113 def initialize @list = [] end
Creates an empty list.
Public Instance Methods
Source
# File lib/bbs/flow/questions.rb, line 119 def option(label, &) = @list << [label, Flow.steps(&)]
Adds an option labelled label whose steps are those of the block.