From 9bdde5796a6e6ed56a29865b19a910bdea5d078e Mon Sep 17 00:00:00 2001 From: Douglas Barbosa Alexandre Date: Mon, 24 Apr 2017 19:04:39 -0300 Subject: Add Github::Representation::Base#id --- lib/github/representation/base.rb | 4 ++++ lib/github/representation/repo.rb | 3 --- lib/github/representation/user.rb | 4 ---- 3 files changed, 4 insertions(+), 7 deletions(-) (limited to 'lib') 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) -- cgit v1.2.1