diff options
author | Valery Sizov <valery@gitlab.com> | 2016-12-07 14:00:06 +0200 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2016-12-07 14:00:06 +0200 |
commit | b12d6541835024eb74384551b84bf0e74747d0c3 (patch) | |
tree | cde3a9635d616f20bf8c747221d475e0c852b86b /lib/bitbucket/representation | |
parent | 67b7637e5d7d3cf3e3f5cde6e7f984ece368c48c (diff) | |
download | gitlab-ce-b12d6541835024eb74384551b84bf0e74747d0c3.tar.gz |
BitBuckpet importer. Refactoring. Iteration 2
Diffstat (limited to 'lib/bitbucket/representation')
-rw-r--r-- | lib/bitbucket/representation/base.rb | 4 | ||||
-rw-r--r-- | lib/bitbucket/representation/url.rb | 9 |
2 files changed, 4 insertions, 9 deletions
diff --git a/lib/bitbucket/representation/base.rb b/lib/bitbucket/representation/base.rb index 7b639492d38..94adaacc9b5 100644 --- a/lib/bitbucket/representation/base.rb +++ b/lib/bitbucket/representation/base.rb @@ -5,6 +5,10 @@ module Bitbucket @raw = raw end + def self.decorate(entries) + entries.map { |entry| new(entry)} + end + private attr_reader :raw diff --git a/lib/bitbucket/representation/url.rb b/lib/bitbucket/representation/url.rb deleted file mode 100644 index 24ae1048013..00000000000 --- a/lib/bitbucket/representation/url.rb +++ /dev/null @@ -1,9 +0,0 @@ -module Bitbucket - module Representation - class Url < Representation::Base - def to_s - raw.dig('links', 'self', 'href') - end - end - end -end |