Class: TicketReport::ViewTicket
- Inherits:
-
Struct
- Object
- Struct
- TicketReport::ViewTicket
- Defined in:
- app/interactors/ticket_report.rb
Instance Attribute Summary collapse
-
#antecedents ⇒ Object
Returns the value of attribute antecedents.
-
#closed_at ⇒ Object
Returns the value of attribute closed_at.
-
#id ⇒ Object
Returns the value of attribute id.
-
#milestone_id ⇒ Object
Returns the value of attribute milestone_id.
-
#milestone_name ⇒ Object
Returns the value of attribute milestone_name.
-
#number ⇒ Object
Returns the value of attribute number.
-
#opened_at ⇒ Object
Returns the value of attribute opened_at.
-
#reporter_email ⇒ Object
Returns the value of attribute reporter_email.
-
#reporter_first_name ⇒ Object
Returns the value of attribute reporter_first_name.
-
#reporter_last_name ⇒ Object
Returns the value of attribute reporter_last_name.
-
#summary ⇒ Object
Returns the value of attribute summary.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
Instance Attribute Details
#antecedents ⇒ Object
Returns the value of attribute antecedents
3 4 5 |
# File 'app/interactors/ticket_report.rb', line 3 def antecedents @antecedents end |
#closed_at ⇒ Object
Returns the value of attribute closed_at
3 4 5 |
# File 'app/interactors/ticket_report.rb', line 3 def closed_at @closed_at end |
#id ⇒ Object
Returns the value of attribute id
3 4 5 |
# File 'app/interactors/ticket_report.rb', line 3 def id @id end |
#milestone_id ⇒ Object
Returns the value of attribute milestone_id
3 4 5 |
# File 'app/interactors/ticket_report.rb', line 3 def milestone_id @milestone_id end |
#milestone_name ⇒ Object
Returns the value of attribute milestone_name
3 4 5 |
# File 'app/interactors/ticket_report.rb', line 3 def milestone_name @milestone_name end |
#number ⇒ Object
Returns the value of attribute number
3 4 5 |
# File 'app/interactors/ticket_report.rb', line 3 def number @number end |
#opened_at ⇒ Object
Returns the value of attribute opened_at
3 4 5 |
# File 'app/interactors/ticket_report.rb', line 3 def opened_at @opened_at end |
#reporter_email ⇒ Object
Returns the value of attribute reporter_email
3 4 5 |
# File 'app/interactors/ticket_report.rb', line 3 def reporter_email @reporter_email end |
#reporter_first_name ⇒ Object
Returns the value of attribute reporter_first_name
3 4 5 |
# File 'app/interactors/ticket_report.rb', line 3 def reporter_first_name @reporter_first_name end |
#reporter_last_name ⇒ Object
Returns the value of attribute reporter_last_name
3 4 5 |
# File 'app/interactors/ticket_report.rb', line 3 def reporter_last_name @reporter_last_name end |
#summary ⇒ Object
Returns the value of attribute summary
3 4 5 |
# File 'app/interactors/ticket_report.rb', line 3 def summary @summary end |
#type ⇒ Object
Returns the value of attribute type
3 4 5 |
# File 'app/interactors/ticket_report.rb', line 3 def type @type end |
Instance Method Details
#as_json(options = {}) ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'app/interactors/ticket_report.rb', line 25 def as_json(={}) { id: id, number: number, type: type.downcase, summary: summary, reporter: { email: reporter_email, name: reporter_name }, milestone: milestone_id && { id: milestone_id, name: milestone_name }, antecedents: antecedents.map { |antecedent| { id: antecedent.id, kind: antecedent.kind } }, openedAt: opened_at, closedAt: closed_at } end |
#reporter_name ⇒ Object
21 22 23 |
# File 'app/interactors/ticket_report.rb', line 21 def reporter_name "#{reporter_first_name} #{reporter_last_name}" end |