Class ConfigTable::ExecItem
In: setup.rb
Parent: Item

Methods

config_type   evaluate   new   resolve   value?  

Public Class methods

[Source]

# File setup.rb, line 422
    def initialize(name, selection, desc, &block)
      super name, selection, nil, desc
      @ok = selection.split('/')
      @action = block
    end

Public Instance methods

[Source]

# File setup.rb, line 428
    def config_type
      'exec'
    end

[Source]

# File 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

[Source]

# File setup.rb, line 436
    def resolve(table)
      setup_rb_error "$#{name()} wrongly used as option value"
    end

[Source]

# File setup.rb, line 432
    def value?
      false
    end

[Validate]