Class: Checklister::Gitlab::ProjectDecorator

Inherits:
Object
  • Object
show all
Defined in:
lib/checklister/gitlab/project.rb

Instance Method Summary collapse

Constructor Details

#initialize(object) ⇒ ProjectDecorator

Returns a new instance of ProjectDecorator.



4
5
6
# File 'lib/checklister/gitlab/project.rb', line 4

def initialize(object)
  @object = object
end

Instance Method Details

#descriptionObject



16
17
18
# File 'lib/checklister/gitlab/project.rb', line 16

def description
  @object.description
end

#idObject



8
9
10
# File 'lib/checklister/gitlab/project.rb', line 8

def id
  @object.id
end

#nameObject



12
13
14
# File 'lib/checklister/gitlab/project.rb', line 12

def name
  @object.name_with_namespace
end

#to_hashObject



20
21
22
# File 'lib/checklister/gitlab/project.rb', line 20

def to_hash
  { id: id, name: name, description: description }
end