Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def self.from(name_with_owner : String)
- case name_with_owner.split('/')
- when {host, owner, name} then self.new(host, name, owner)
- when {owner, name} then self.new("github.com", owner, name)
- when {name} then self.new("github.com", name, name)
- else self.new("a", "b", "c")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement