Class: PKGUtil::PKG

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url) ⇒ PKG

Returns a new instance of PKG.



53
54
55
# File 'lib/iesd/utility/pkgutil.rb', line 53

def initialize url
  @url = File.absolute_path url
end

Instance Attribute Details

#urlObject

Returns the value of attribute url.



51
52
53
# File 'lib/iesd/utility/pkgutil.rb', line 51

def url
  @url
end

Instance Method Details

#editObject



61
62
63
# File 'lib/iesd/utility/pkgutil.rb', line 61

def edit
  update
end

#show(&block) ⇒ Object



57
58
59
# File 'lib/iesd/utility/pkgutil.rb', line 57

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

#update(&block) ⇒ Object



65
66
67
# File 'lib/iesd/utility/pkgutil.rb', line 65

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