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

Methods

help_opt   new   resolve   set   value   value?  

External Aliases

default -> help_default

Attributes

default  [RW] 
description  [R] 
name  [R] 

Public Class methods

[Source]

# File setup.rb, line 318
    def initialize(name, template, default, desc)
      @name = name.freeze
      @template = template
      @value = default
      @default = default
      @description = desc
    end

Public Instance methods

[Source]

# File setup.rb, line 332
    def help_opt
      "--#{@name}=#{@template}"
    end

[Source]

# File setup.rb, line 344
    def resolve(table)
      @value.gsub(%r<\$([^/]+)>) { table[$1] }
    end

[Source]

# File setup.rb, line 348
    def set(val)
      @value = check(val)
    end

[Source]

# File setup.rb, line 340
    def value
      @value
    end

[Source]

# File setup.rb, line 336
    def value?
      true
    end

[Validate]