Class: GitlabCli::Snippet
- Inherits:
-
Object
- Object
- GitlabCli::Snippet
- Defined in:
- lib/gitlab_cli/snippet.rb
Instance Attribute Summary collapse
-
#author ⇒ Object
Returns the value of attribute author.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#expires_at ⇒ Object
Returns the value of attribute expires_at.
-
#file_name ⇒ Object
Returns the value of attribute file_name.
-
#id ⇒ Object
Returns the value of attribute id.
-
#project_id ⇒ Object
Returns the value of attribute project_id.
-
#title ⇒ Object
Returns the value of attribute title.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
-
#view_url ⇒ Object
Returns the value of attribute view_url.
Instance Method Summary collapse
-
#initialize(id, title, file_name, expires_at, updated_at, created_at, project_id, author = nil) ⇒ Snippet
constructor
A new instance of Snippet.
Constructor Details
#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 = .class == 'Gitlab::User' || .nil? ? : () end |
Instance Attribute Details
#author ⇒ Object
Returns the value of attribute author.
3 4 5 |
# File 'lib/gitlab_cli/snippet.rb', line 3 def end |
#created_at ⇒ Object
Returns the value of attribute created_at.
3 4 5 |
# File 'lib/gitlab_cli/snippet.rb', line 3 def created_at @created_at end |
#expires_at ⇒ Object
Returns the value of attribute expires_at.
3 4 5 |
# File 'lib/gitlab_cli/snippet.rb', line 3 def expires_at @expires_at end |
#file_name ⇒ Object
Returns the value of attribute file_name.
3 4 5 |
# File 'lib/gitlab_cli/snippet.rb', line 3 def file_name @file_name end |
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/gitlab_cli/snippet.rb', line 3 def id @id end |
#project_id ⇒ Object
Returns the value of attribute project_id.
3 4 5 |
# File 'lib/gitlab_cli/snippet.rb', line 3 def project_id @project_id end |
#title ⇒ Object
Returns the value of attribute title.
3 4 5 |
# File 'lib/gitlab_cli/snippet.rb', line 3 def title @title end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
3 4 5 |
# File 'lib/gitlab_cli/snippet.rb', line 3 def updated_at @updated_at end |
#view_url ⇒ Object
Returns the value of attribute view_url.
3 4 5 |
# File 'lib/gitlab_cli/snippet.rb', line 3 def view_url @view_url end |