Class: Eft::CfgCheck

Inherits:
Cfg
  • Object
show all
Includes:
CfgCancel, CfgEsc, CfgOK
Defined in:
lib/eft.rb

Overview

checkboxes config

Instance Method Summary collapse

Methods included from CfgEsc

#on_esc

Methods included from CfgOK

#on_ok

Methods included from CfgCancel

#on_cancel

Methods inherited from Cfg

#call

Constructor Details

#initialize(*a, &b) ⇒ CfgCheck

Returns a new instance of CfgCheck.



131
132
133
# File 'lib/eft.rb', line 131

def initialize(*a, &b)
  @check = []; super; @check.freeze
end

Instance Method Details

#_checkObject



140
# File 'lib/eft.rb', line 140

def _check; @check end

#_optsObject



141
# File 'lib/eft.rb', line 141

def _opts; CHECK_OPTS; end

#choice(tag, item, selected = false) ⇒ Object

add a choice



136
137
138
# File 'lib/eft.rb', line 136

def choice(tag, item, selected = false)
  @check << { tag: tag, item: item, selected: selected }
end