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.



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

def initialize url
  @url = File.absolute_path url
end

Instance Attribute Details

#urlObject

Returns the value of attribute url.



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

def url
  @url
end

Instance Method Details

#editObject



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

def edit
  update
end

#show(&block) ⇒ Object



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

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

#update(&block) ⇒ Object



68
69
70
# File 'lib/iesd/utility/pkgutil.rb', line 68

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