Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# gem install jphastings-dlc
require 'dlc'
s = DLC::Settings.new
s.name = "Your Name"
s.url = "http://yourdomain.com"
s.email = "your.name@yourdomain.com"
# 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
You can’t perform that action at this time.