Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # ...
- class Package
- def name
- @name
- end
- def name(name)
- @name = name
- end
- def version
- @version
- end
- def version(version)
- @version = version
- end
- def filename
- @filename
- end
- def filename(filename)
- @filename = filename
- end
- def description
- @desc
- end
- def description(desc)
- @desc = desc
- end
- def url
- @url
- end
- def url(url)
- @url = url
- end
- def to_s
- @name
- end
- end
- #...
- parse_repository_file(repo).each do |pkg|
- puts pkg.name
- puts pkg.to_s
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement