summaryrefslogtreecommitdiff
path: root/lib/bitbucket/page.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bitbucket/page.rb')
-rw-r--r--lib/bitbucket/page.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/bitbucket/page.rb b/lib/bitbucket/page.rb
index 49d083cc66f..8f50f67f84d 100644
--- a/lib/bitbucket/page.rb
+++ b/lib/bitbucket/page.rb
@@ -18,14 +18,12 @@ module Bitbucket
private
def parse_attrs(raw)
- attrs = %w(size page pagelen next previous)
- attrs.map { |attr| { attr.to_sym => raw[attr] } }.reduce(&:merge)
+ raw.slice(*%w(size page pagelen next previous)).symbolize_keys
end
def parse_values(raw, bitbucket_rep_class)
return [] unless raw['values'] && raw['values'].is_a?(Array)
-
- raw['values'].map { |hash| bitbucket_rep_class.new(hash) }
+ bitbucket_rep_class.decorate(raw['values'])
end
def representation_class(type)