Class: Telephony::ConversationsPresenter

Inherits:
Object
  • Object
show all
Defined in:
app/models/telephony/conversations_presenter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(conversations) ⇒ ConversationsPresenter

Returns a new instance of ConversationsPresenter.



5
6
7
# File 'app/models/telephony/conversations_presenter.rb', line 5

def initialize(conversations)
  self.conversations = conversations
end

Instance Attribute Details

#conversationsObject

Returns the value of attribute conversations.



3
4
5
# File 'app/models/telephony/conversations_presenter.rb', line 3

def conversations
  @conversations
end

Instance Method Details

#as_json(args = nil) ⇒ Object



9
10
11
# File 'app/models/telephony/conversations_presenter.rb', line 9

def as_json(args = nil)
  conversations.map { |convo| conversation_presenter(convo) }
end