Class: Basecamp3::TodoSet

Inherits:
Model
  • Object
show all
Includes:
Concerns::Bucketable, Concerns::Creatorable
Defined in:
lib/basecamp3/models/todo_set.rb

Overview

Constant Summary

Constants inherited from Model

Model::REQUIRED_FIELDS

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Concerns::Bucketable

#bucket

Methods included from Concerns::Creatorable

#creator

Methods inherited from Model

#initialize

Constructor Details

This class inherits a constructor from Basecamp3::Model

Instance Attribute Details

#completedObject

Returns the value of attribute completed



8
9
10
# File 'lib/basecamp3/models/todo_set.rb', line 8

def completed
  @completed
end

#completed_ratioObject

Returns the value of attribute completed_ratio



8
9
10
# File 'lib/basecamp3/models/todo_set.rb', line 8

def completed_ratio
  @completed_ratio
end

#created_atObject

Returns the value of attribute created_at



8
9
10
# File 'lib/basecamp3/models/todo_set.rb', line 8

def created_at
  @created_at
end

#idObject

Returns the value of attribute id



8
9
10
# File 'lib/basecamp3/models/todo_set.rb', line 8

def id
  @id
end

#nameObject

Returns the value of attribute name



8
9
10
# File 'lib/basecamp3/models/todo_set.rb', line 8

def name
  @name
end

#statusObject

Returns the value of attribute status



8
9
10
# File 'lib/basecamp3/models/todo_set.rb', line 8

def status
  @status
end

#todolists_countObject

Returns the value of attribute todolists_count



8
9
10
# File 'lib/basecamp3/models/todo_set.rb', line 8

def todolists_count
  @todolists_count
end

#updated_atObject

Returns the value of attribute updated_at



8
9
10
# File 'lib/basecamp3/models/todo_set.rb', line 8

def updated_at
  @updated_at
end

Class Method Details

.find(bucket_id, id) ⇒ Basecamp3::TodoSet

Returns the TODO set.

Parameters:

  • bucket_id (Integer)

    the id of the bucket

  • id (Integer)

    the id of the TODO set

Returns:



30
31
32
# File 'lib/basecamp3/models/todo_set.rb', line 30

def self.find(bucket_id, id)
  Basecamp3.request.get("/buckets/#{bucket_id}/todosets/#{id}", {}, Basecamp3::TodoSet)
end

Instance Method Details

#todo_listsArray<Basecamp3::TodoList>

Returns a list of related todo lists.

Returns:



20
21
22
# File 'lib/basecamp3/models/todo_set.rb', line 20

def todo_lists
  @mapped_todo_lists ||= Basecamp3::TodoList.all(bucket.id, id)
end