Created
May 5, 2009 14:01
-
-
Save jphastings/106978 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# gem install jphastings-dlc | |
require 'dlc' | |
s = DLC::Settings.new | |
s.name = "Your Name" | |
s.url = "http://yourdomain.com" | |
s.email = "[email protected]" | |
# Now you can make a dlc: | |
package = DLC::Package.new | |
package.name = "My package" # Suggested, but not required | |
package.comment = "like, woah" # Optional | |
# Add some links | |
package.add_link("http://google.com") | |
# You can pass an array | |
package.add_link(["http://bbc.co.uk","http://slashdot.org"]) | |
# Add a password, if needed | |
package.add_password("password") | |
# Make the DLC | |
open("my_dlc.dlc","w") do |f| | |
f.write package.dlc | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment