class ConfigTable::BoolItem
Public Instance Methods
config_type()
click to toggle source
# File lib/rbt/yaml/individual_cookbooks/setup.rb, line 383 def config_type 'bool' end
help_opt()
click to toggle source
# File lib/rbt/yaml/individual_cookbooks/setup.rb, line 387 def help_opt "--#{@name}" end
Private Instance Methods
check(val)
click to toggle source
# File lib/rbt/yaml/individual_cookbooks/setup.rb, line 393 def check(val) return 'yes' unless val case val when /\Ay(es)?\z/i, /\At(rue)?\z/i then 'yes' when /\An(o)?\z/i, /\Af(alse)\z/i then 'no' else setup_rb_error "config: --#{@name} accepts only yes/no for argument" end end