class ConfigTable::ExecItem

Public Class Methods

new(name, selection, desc, &block) click to toggle source
Calls superclass method ConfigTable::Item.new
# File pkg/statsample-1.4.0/setup.rb, line 422
def initialize(name, selection, desc, &block)
  super name, selection, nil, desc
  @ok = selection.split('/')
  @action = block
end

Public Instance Methods

config_type() click to toggle source
# File pkg/statsample-1.4.0/setup.rb, line 428
def config_type
  'exec'
end
evaluate(val, table) click to toggle source
# File pkg/statsample-1.4.0/setup.rb, line 442
def evaluate(val, table)
  v = val.strip.downcase
  unless @ok.include?(v)
    setup_rb_error "invalid option --#{@name}=#{val} (use #{@template})"
  end
  @action.call v, table
end
resolve(table) click to toggle source
# File pkg/statsample-1.4.0/setup.rb, line 436
def resolve(table)
  setup_rb_error "$#{name()} wrongly used as option value"
end
value?() click to toggle source
# File pkg/statsample-1.4.0/setup.rb, line 432
def value?
  false
end