Class: TicketMaster::Provider::Unfuddle::Comment
- Inherits:
-
Base::Comment
- Object
- Base::Comment
- TicketMaster::Provider::Unfuddle::Comment
- Defined in:
- lib/provider/comment.rb
Overview
The comment class for ticketmaster-unfuddle
Do any mapping between Ticketmaster and your system’s comment model here versions of the ticket.
Constant Summary collapse
- API =
The class to access the api’s comments
UnfuddleAPI::Comment
Instance Method Summary collapse
-
#author ⇒ Object
declare needed overloaded methods here.
- #created_at ⇒ Object
- #project_id ⇒ Object
- #ticket_id ⇒ Object
- #updated_at ⇒ Object
Instance Method Details
#author ⇒ Object
declare needed overloaded methods here
12 13 14 15 16 17 18 |
# File 'lib/provider/comment.rb', line 12 def @author ||= begin UnfuddleAPI::People.find(self[:author_id]).username rescue '' end end |
#created_at ⇒ Object
20 21 22 |
# File 'lib/provider/comment.rb', line 20 def created_at @created_at ||= self[:created_at] ? Time.parse(self[:created_at]) : nil end |
#project_id ⇒ Object
28 29 30 |
# File 'lib/provider/comment.rb', line 28 def project_id self.[:project_id] end |
#ticket_id ⇒ Object
32 33 34 |
# File 'lib/provider/comment.rb', line 32 def ticket_id self.[:ticket_id] end |
#updated_at ⇒ Object
24 25 26 |
# File 'lib/provider/comment.rb', line 24 def updated_at @updated_at ||= self[:updated_at] ? Time.parse(self[:updated_at]) : nil end |