Class: Statement::DiscountRow

Inherits:
Object
  • Object
show all
Includes:
Row
Defined in:
app/models/statement.rb

Instance Attribute Summary collapse

Attributes included from Row

#gross, #net, #processing, #tickets

Instance Method Summary collapse

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

#discountObject

Returns the value of attribute discount.



170
171
172
# File 'app/models/statement.rb', line 170

def discount
  @discount
end

#discount_codeObject

Returns the value of attribute discount_code.



170
171
172
# File 'app/models/statement.rb', line 170

def discount_code
  @discount_code
end

#typeObject

Returns the value of attribute type.



170
171
172
# File 'app/models/statement.rb', line 170

def type
  @type
end