Class: TicketMaster::Provider::Mingle::Comment
- Inherits:
-
Base::Comment
- Object
- Base::Comment
- TicketMaster::Provider::Mingle::Comment
- Defined in:
- lib/provider/comment.rb
Overview
The comment class for ticketmaster-mingle
Do any mapping between Ticketmaster and your system’s comment model here versions of the ticket.
Constant Summary collapse
Instance Method Summary collapse
- #created_at ⇒ Object
- #created_by ⇒ Object
-
#initialize(*object) ⇒ Comment
constructor
declare needed overloaded methods here.
- #project_id ⇒ Object
- #ticket_id ⇒ Object
Constructor Details
#initialize(*object) ⇒ Comment
declare needed overloaded methods here
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/provider/comment.rb', line 12 def initialize(*object) if object.first object = object.first @system_data = {:client => object} unless object.is_a? Hash hash = {:content => object.content, :created_at => object.created_at, :created_by => object.created_by, :ticket_id => object.[:number], :project_id => object.[:identifier]} else hash = object end super hash end end |
Instance Method Details
#created_at ⇒ Object
33 34 35 |
# File 'lib/provider/comment.rb', line 33 def created_at self[:created_at] end |
#created_by ⇒ Object
29 30 31 |
# File 'lib/provider/comment.rb', line 29 def created_by self[:created_by] end |
#project_id ⇒ Object
37 38 39 |
# File 'lib/provider/comment.rb', line 37 def project_id self[:identifier] end |
#ticket_id ⇒ Object
41 42 43 |
# File 'lib/provider/comment.rb', line 41 def ticket_id self[:number] end |