Advertisement
Guest User

Untitled

a guest
Jan 9th, 2013
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.71 KB | None | 0 0
  1. # ...
  2.  
  3. class Package
  4.     def name
  5.         @name
  6.     end
  7.    
  8.     def name(name)
  9.         @name = name
  10.     end
  11.    
  12.     def version
  13.         @version
  14.     end
  15.    
  16.     def version(version)
  17.         @version = version
  18.     end
  19.    
  20.     def filename
  21.         @filename
  22.     end
  23.    
  24.     def filename(filename)
  25.         @filename = filename
  26.     end
  27.    
  28.     def description
  29.         @desc
  30.     end
  31.    
  32.     def description(desc)
  33.         @desc = desc
  34.     end
  35.    
  36.     def url
  37.         @url
  38.     end
  39.    
  40.     def url(url)
  41.         @url = url
  42.     end
  43.    
  44.     def to_s
  45.         @name
  46.     end
  47. end
  48.  
  49. #...
  50.  
  51.  parse_repository_file(repo).each do |pkg|
  52.         puts pkg.name
  53.             puts pkg.to_s
  54.  end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement