Class: DocumentCloud::Project

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ Project

Returns a new instance of Project.



5
6
7
8
9
10
# File 'lib/document_cloud/project.rb', line 5

def initialize(attrs={})
  @id               = attrs[:id]
  @title            = attrs[:title]
  @description      = attrs[:description]
  @document_ids     = attrs[:document_ids]
end

Instance Attribute Details

#descriptionObject (readonly)

Returns the value of attribute description.



3
4
5
# File 'lib/document_cloud/project.rb', line 3

def description
  @description
end

#idObject (readonly)

Returns the value of attribute id.



3
4
5
# File 'lib/document_cloud/project.rb', line 3

def id
  @id
end

#titleObject (readonly)

Returns the value of attribute title.



3
4
5
# File 'lib/document_cloud/project.rb', line 3

def title
  @title
end

Instance Method Details

#documentsObject



12
13
14
15
# File 'lib/document_cloud/project.rb', line 12

def documents
  @documents ||= @document_ids.map {|id| DocumentCloud.document(id) }
  @documents
end