TkPackage (Module)

In: tk/lib/tk/package.rb

Methods

Constants

TkCommandNames = ['package'.freeze].freeze

Included Modules

TkCore

Public Instance methods

[Source]

# File tk/lib/tk/package.rb, line 12
  def add_path(path)
    Tk::AUTO_PATH.value = Tk::AUTO_PATH.to_a << path
  end

[Source]

# File tk/lib/tk/package.rb, line 16
  def forget(package)
    tk_call('package', 'forget', package)
    nil
  end

[Source]

# File tk/lib/tk/package.rb, line 21
  def names
    tk_split_simplelist(tk_call('package', 'names'))
  end

[Source]

# File tk/lib/tk/package.rb, line 34
  def present(package, version=None)
    tk_call('package', 'present', package, version)
  end

[Source]

# File tk/lib/tk/package.rb, line 38
  def present_exact(package, version)
    tk_call('package', 'present', '-exact', package, version)
  end

[Source]

# File tk/lib/tk/package.rb, line 25
  def provide(package, version=nil)
    if version
      tk_call('package', 'provide', package, version)
      nil
    else
      tk_call('package', 'provide', package)
    end
  end

[Source]

# File tk/lib/tk/package.rb, line 42
  def require(package, version=None)
    tk_call('package', 'require', package, version)
  end

[Source]

# File tk/lib/tk/package.rb, line 46
  def require_exact(package, version)
    tk_call('package', 'require', '-exact', package, version)
  end

[Source]

# File tk/lib/tk/package.rb, line 54
  def vcompare(version1, version2)
    number(tk_call('package', 'vcompare', version1, version2))
  end

[Source]

# File tk/lib/tk/package.rb, line 50
  def versions(package)
    tk_split_simplelist(tk_call('package', 'versions', package))
  end

[Source]

# File tk/lib/tk/package.rb, line 58
  def vsatisfies(version1, version2)
    bool(tk_call('package', 'vsatisfies', version1, version2))
  end

[Validate]