Class: PKGUtil::PKG

Inherits:
Object
  • Object
show all
Defined in:
lib/iesd/utility/pkgutil.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url) ⇒ PKG

Initialize a new PKG.

url - The String path to the PKG.



87
88
89
# File 'lib/iesd/utility/pkgutil.rb', line 87

def initialize url
  @url = File.absolute_path url
end

Instance Attribute Details

#urlObject

The String path to the PKG.



82
83
84
# File 'lib/iesd/utility/pkgutil.rb', line 82

def url
  @url
end

Instance Method Details

#editObject

Open a read-write shell in the PKG.



97
98
99
# File 'lib/iesd/utility/pkgutil.rb', line 97

def edit
  update
end

#show(&block) ⇒ Object

Perform read-only actions on the PKG.



92
93
94
# File 'lib/iesd/utility/pkgutil.rb', line 92

def show &block
  PKGUtil.read(@url, &block)
end

#update(&block) ⇒ Object

Perform read-write actions on the PKG.



102
103
104
# File 'lib/iesd/utility/pkgutil.rb', line 102

def update &block
  PKGUtil.write(@url, &block)
end