Class: Basecamp3::MessageBoard

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

Overview

Constant Summary

Constants inherited from Model

Basecamp3::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

#created_atObject

Returns the value of attribute created_at



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

def created_at
  @created_at
end

#idObject

Returns the value of attribute id



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

def id
  @id
end

#messages_countObject

Returns the value of attribute messages_count



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

def messages_count
  @messages_count
end

#statusObject

Returns the value of attribute status



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

def status
  @status
end

#titleObject

Returns the value of attribute title



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

def title
  @title
end

#updated_atObject

Returns the value of attribute updated_at



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

def updated_at
  @updated_at
end

Class Method Details

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

Returns the message board.

Parameters:

  • bucket_id (Integer)

    the id of the bucket

  • id (Integer)

    the id of the message board

Returns:



28
29
30
# File 'lib/basecamp3/models/message_board.rb', line 28

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

Instance Method Details

#messagesArray<Basecamp3::Message>

Returns a list of related messages.

Returns:



18
19
20
# File 'lib/basecamp3/models/message_board.rb', line 18

def messages
  @mapped_messages ||= Basecamp3::Message.all(bucket.id, id)
end