summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2017-04-24 19:04:39 -0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2017-04-24 19:04:39 -0300
commit9bdde5796a6e6ed56a29865b19a910bdea5d078e (patch)
treee7d4a4754278aa1898b998c669df2e8e8b84d643 /lib
parent2b7328c3171661ce8e4a5b3b840ff5f3df19d3e0 (diff)
downloadgitlab-ce-9bdde5796a6e6ed56a29865b19a910bdea5d078e.tar.gz
Add Github::Representation::Base#id
Diffstat (limited to 'lib')
-rw-r--r--lib/github/representation/base.rb4
-rw-r--r--lib/github/representation/repo.rb3
-rw-r--r--lib/github/representation/user.rb4
3 files changed, 4 insertions, 7 deletions
diff --git a/lib/github/representation/base.rb b/lib/github/representation/base.rb
index 385e62ae99d..f26bdbdd546 100644
--- a/lib/github/representation/base.rb
+++ b/lib/github/representation/base.rb
@@ -6,6 +6,10 @@ module Github
@options = options
end
+ def id
+ raw['id']
+ end
+
def url
raw['url']
end
diff --git a/lib/github/representation/repo.rb b/lib/github/representation/repo.rb
index b9cae43450e..6938aa7db05 100644
--- a/lib/github/representation/repo.rb
+++ b/lib/github/representation/repo.rb
@@ -1,9 +1,6 @@
module Github
module Representation
class Repo < Representation::Base
- def id
- raw['id']
- end
end
end
end
diff --git a/lib/github/representation/user.rb b/lib/github/representation/user.rb
index 79758555319..18591380e25 100644
--- a/lib/github/representation/user.rb
+++ b/lib/github/representation/user.rb
@@ -1,10 +1,6 @@
module Github
module Representation
class User < Representation::Base
- def id
- raw['id']
- end
-
def email
return @email if defined?(@email)