Class: RChoice::ProcChoice

Inherits:
Choice show all
Defined in:
lib/rchoice/choice.rb

Instance Attribute Summary

Attributes inherited from Choice

#action_blk, #chooser, #name, #optional, #parent_obj

Instance Method Summary collapse

Methods inherited from Choice

#add_option, #options=

Instance Method Details

#execute!Object



35
36
37
# File 'lib/rchoice/choice.rb', line 35

def execute!
  chosen_option.execute! if chosen_option
end

#make_option(name, &b) ⇒ Object



38
39
40
# File 'lib/rchoice/choice.rb', line 38

def make_option(name,&b)
  ProcOption.new(:name => name, :blk => b)
end