Skip to content

Instantly share code, notes, and snippets.

@josephrexme
Created July 4, 2015 08:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save josephrexme/be9906eb1d2118e6dd53 to your computer and use it in GitHub Desktop.
Save josephrexme/be9906eb1d2118e6dd53 to your computer and use it in GitHub Desktop.
Parser method
def parse(self)
=begin
Method to parse the resource file for the terminal alias
provided, and populate the gw array with the terminal information.
Parameters
==========
None
Exceptions
==========
zipfile.BadZipfile - in case resource file cannot be read
AliasNotFound - if alias terminal not found in
resource file
=end
out = StringIO::StringIO
File.open(self.RESOURCE,'rb') do |f|
puts out.write(f.read)
end
begin
temp = zipfile.ZipFile(out)
rescue IOError => e
p e.message
end
if temp.namelist.include? "#{self.ALIAS}.xml"
t = temp.open("#{self.ALIAS}.xml")
s = self._xor()
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment