Class: Gitlab::LegacyGithubImport::UserFormatter
- Inherits:
-
Object
- Object
- Gitlab::LegacyGithubImport::UserFormatter
- Defined in:
- lib/gitlab/legacy_github_import/user_formatter.rb
Constant Summary collapse
- GITEA_GHOST_EMAIL =
'ghost_user@gitea_import_dummy_email.com'
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
Instance Method Summary collapse
- #gitlab_id ⇒ Object
- #id ⇒ Object
-
#initialize(client, raw) ⇒ UserFormatter
constructor
A new instance of UserFormatter.
- #login ⇒ Object
Constructor Details
#initialize(client, raw) ⇒ UserFormatter
Returns a new instance of UserFormatter.
10 11 12 13 |
# File 'lib/gitlab/legacy_github_import/user_formatter.rb', line 10 def initialize(client, raw) @client = client @raw = raw end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
6 7 8 |
# File 'lib/gitlab/legacy_github_import/user_formatter.rb', line 6 def client @client end |
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
6 7 8 |
# File 'lib/gitlab/legacy_github_import/user_formatter.rb', line 6 def raw @raw end |
Instance Method Details
#gitlab_id ⇒ Object
23 24 25 26 27 |
# File 'lib/gitlab/legacy_github_import/user_formatter.rb', line 23 def gitlab_id return @gitlab_id if defined?(@gitlab_id) @gitlab_id = find_by_external_uid || find_by_email end |
#id ⇒ Object
15 16 17 |
# File 'lib/gitlab/legacy_github_import/user_formatter.rb', line 15 def id raw[:id] end |
#login ⇒ Object
19 20 21 |
# File 'lib/gitlab/legacy_github_import/user_formatter.rb', line 19 def login raw[:login] end |