Skip to content
Snippets Groups Projects
Commit 4d7303a9 authored by Stan Hu's avatar Stan Hu
Browse files

Clean up owner and slug representation

parent 9e6b25d0
No related branches found
No related tags found
No related merge requests found
Loading
@@ -5,10 +5,18 @@ module Bitbucket
Loading
@@ -5,10 +5,18 @@ module Bitbucket
   
def initialize(raw) def initialize(raw)
super(raw) super(raw)
end
   
if full_name && full_name.split('/').size == 2 def owner_and_slug
@owner, @slug = full_name.split('/') @owner_and_slug ||= full_name.split('/', 2)
end end
def owner
owner_and_slug.first
end
def slug
owner_and_slug.last
end end
   
def clone_url(token = nil) def clone_url(token = nil)
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment