Class: Telephony::ConversationsPresenter
- Inherits:
-
Object
- Object
- Telephony::ConversationsPresenter
- Defined in:
- app/models/telephony/conversations_presenter.rb
Instance Attribute Summary collapse
-
#conversations ⇒ Object
Returns the value of attribute conversations.
Instance Method Summary collapse
- #as_json(args = nil) ⇒ Object
-
#initialize(conversations) ⇒ ConversationsPresenter
constructor
A new instance of ConversationsPresenter.
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
#conversations ⇒ Object
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 |