Commit 489d241c authored by Stan Hu's avatar Stan Hu

Incorporate review comments

parent 82d7a3a3
...@@ -29,8 +29,7 @@ module Bitbucket ...@@ -29,8 +29,7 @@ module Bitbucket
end end
def representation_class(type) def representation_class(type)
class_name = "Bitbucket::Representation::#{type.to_s.camelize}" class_name = Bitbucket::Representation.const_get(type.to_s.camelize)
class_name.constantize
end end
end end
end end
...@@ -32,7 +32,7 @@ module OmniAuth ...@@ -32,7 +32,7 @@ module OmniAuth
end end
def primary_email def primary_email
primary = emails.find{ |i| i['is_primary'] && i['is_confirmed'] } primary = emails.find { |i| i['is_primary'] && i['is_confirmed'] }
primary && primary['email'] || nil primary && primary['email'] || nil
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment