Class: Obeya::Ticket
- Inherits:
-
Object
- Object
- Obeya::Ticket
- Defined in:
- lib/obeya/ticket.rb
Instance Method Summary collapse
-
#initialize(title, description, format, ticket_type, bin) ⇒ Ticket
constructor
A new instance of Ticket.
- #to_json ⇒ Object
Constructor Details
#initialize(title, description, format, ticket_type, bin) ⇒ Ticket
Returns a new instance of Ticket.
4 5 6 7 8 9 10 |
# File 'lib/obeya/ticket.rb', line 4 def initialize(title, description, format, ticket_type, bin) @title = title @description = description @format = format @ticket_type = ticket_type @bin = bin end |
Instance Method Details
#to_json ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/obeya/ticket.rb', line 12 def to_json { "name": @title, "rtformat": @format, "description": normalise(@description), "bin_id": @bin.id, "ticketType_id": @ticket_type.id }.to_json end |