diff options
Diffstat (limited to 'lib/gitlab/github_import/representation/expose_attribute.rb')
-rw-r--r-- | lib/gitlab/github_import/representation/expose_attribute.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gitlab/github_import/representation/expose_attribute.rb b/lib/gitlab/github_import/representation/expose_attribute.rb index d2438ee8094..84de4d4798d 100644 --- a/lib/gitlab/github_import/representation/expose_attribute.rb +++ b/lib/gitlab/github_import/representation/expose_attribute.rb @@ -20,6 +20,10 @@ module Gitlab end end end + + def [](key) + respond_to?(key.to_sym) ? attributes[key] : nil + end end end end |