Class: RChoice::ProcOption

Inherits:
Option show all
Includes:
FromHash
Defined in:
lib/rchoice/option.rb

Instance Attribute Summary collapse

Attributes inherited from Option

#base_obj

Instance Method Summary collapse

Instance Attribute Details

#blkObject

Returns the value of attribute blk.



16
17
18
# File 'lib/rchoice/option.rb', line 16

def blk
  @blk
end

#nameObject

Returns the value of attribute name.



16
17
18
# File 'lib/rchoice/option.rb', line 16

def name
  @name
end

Instance Method Details

#execute!Object



17
18
19
# File 'lib/rchoice/option.rb', line 17

def execute!
  blk.call
end

#to_sObject



20
21
22
# File 'lib/rchoice/option.rb', line 20

def to_s
  name
end