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.



156
157
158
159
160
161
162
163
164
# File 'app/models/statement.rb', line 156

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.



154
155
156
# File 'app/models/statement.rb', line 154

def discount
  @discount
end

#discount_codeObject

Returns the value of attribute discount_code.



154
155
156
# File 'app/models/statement.rb', line 154

def discount_code
  @discount_code
end

#typeObject

Returns the value of attribute type.



154
155
156
# File 'app/models/statement.rb', line 154

def type
  @type
end