Class: Organizer::Ticket
- Inherits:
-
Object
- Object
- Organizer::Ticket
- Defined in:
- lib/organizer/objects/ticket.rb
Instance Attribute Summary collapse
-
#cost ⇒ Object
Returns the value of attribute cost.
-
#description ⇒ Object
Returns the value of attribute description.
-
#donation ⇒ Object
Returns the value of attribute donation.
-
#free ⇒ Object
Returns the value of attribute free.
-
#name ⇒ Object
Returns the value of attribute name.
-
#quantity_total ⇒ Object
Returns the value of attribute quantity_total.
-
#sales_start ⇒ Object
Returns the value of attribute sales_start.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ Ticket
constructor
A new instance of Ticket.
Constructor Details
#initialize(params = {}) ⇒ Ticket
Returns a new instance of Ticket.
7 8 9 10 11 |
# File 'lib/organizer/objects/ticket.rb', line 7 def initialize(params={}) params.each do |attr, value| self.public_send("#{attr}=", value) end end |
Instance Attribute Details
#cost ⇒ Object
Returns the value of attribute cost.
3 4 5 |
# File 'lib/organizer/objects/ticket.rb', line 3 def cost @cost end |
#description ⇒ Object
Returns the value of attribute description.
4 5 6 |
# File 'lib/organizer/objects/ticket.rb', line 4 def description @description end |
#donation ⇒ Object
Returns the value of attribute donation.
4 5 6 |
# File 'lib/organizer/objects/ticket.rb', line 4 def donation @donation end |
#free ⇒ Object
Returns the value of attribute free.
4 5 6 |
# File 'lib/organizer/objects/ticket.rb', line 4 def free @free end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/organizer/objects/ticket.rb', line 4 def name @name end |
#quantity_total ⇒ Object
Returns the value of attribute quantity_total.
4 5 6 |
# File 'lib/organizer/objects/ticket.rb', line 4 def quantity_total @quantity_total end |
#sales_start ⇒ Object
Returns the value of attribute sales_start.
3 4 5 |
# File 'lib/organizer/objects/ticket.rb', line 3 def sales_start @sales_start end |