Class: Statement::DiscountRow
- Inherits:
-
Object
- Object
- Statement::DiscountRow
- Includes:
- Row
- Defined in:
- app/models/statement.rb
Instance Attribute Summary collapse
-
#discount ⇒ Object
Returns the value of attribute discount.
-
#discount_code ⇒ Object
Returns the value of attribute discount_code.
-
#type ⇒ Object
Returns the value of attribute type.
Attributes included from Row
#gross, #net, #processing, #tickets
Instance Method Summary collapse
-
#initialize(discount_code, type) ⇒ DiscountRow
constructor
A new instance of DiscountRow.
Methods included from Row
Constructor Details
#initialize(discount_code, type) ⇒ DiscountRow
Returns a new instance of DiscountRow.
172 173 174 175 176 177 178 179 180 |
# File 'app/models/statement.rb', line 172 def initialize(discount_code, type) self.discount_code = discount_code self.type = type self.tickets = 0 self.gross = 0 self.processing = 0 self.net = 0 self.discount = 0 end |
Instance Attribute Details
#discount ⇒ Object
Returns the value of attribute discount.
170 171 172 |
# File 'app/models/statement.rb', line 170 def discount @discount end |
#discount_code ⇒ Object
Returns the value of attribute discount_code.
170 171 172 |
# File 'app/models/statement.rb', line 170 def discount_code @discount_code end |
#type ⇒ Object
Returns the value of attribute type.
170 171 172 |
# File 'app/models/statement.rb', line 170 def type @type end |