Method: GitlabCli::Snippet#initialize
- Defined in:
- lib/gitlab_cli/snippet.rb
#initialize(id, title, file_name, expires_at, updated_at, created_at, project_id, author = nil) ⇒ Snippet
Returns a new instance of Snippet.
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/gitlab_cli/snippet.rb', line 5 def initialize(id, title, file_name, expires_at, updated_at, created_at, project_id, =nil) @id = id @title = title @file_name = file_name @expires_at = expires_at @updated_at = updated_at @created_at = created_at @project_id = project_id @view_url = get_view_url @author = .class == 'Gitlab::User' || .nil? ? : () end |