Class: Eg::Book::OrderedDiscountGroup

Inherits:
Object
  • Object
show all
Defined in:
lib/eg/book/discount_group_ordered_list.rb

Overview

System under test

Constant Summary collapse

@@metadata =
{ 'order' => Fixnum, 'future_value' => String,
'max_owing' => Float, 'min_purchase' => Float, 'discount_percent' => Float }

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(order, future_value, max_owing, min_purchase, discount_percent) ⇒ OrderedDiscountGroup

Returns a new instance of OrderedDiscountGroup.



27
28
29
30
31
32
33
# File 'lib/eg/book/discount_group_ordered_list.rb', line 27

def initialize order, future_value, max_owing, min_purchase, discount_percent
  @order = order
  @future_value = future_value
  @max_owing = max_owing
  @min_purchase = min_purchase
  @discount_percent = discount_percent
end

Instance Attribute Details

#discount_percentObject (readonly)

Returns the value of attribute discount_percent.



26
27
28
# File 'lib/eg/book/discount_group_ordered_list.rb', line 26

def discount_percent
  @discount_percent
end

#future_valueObject (readonly)

Returns the value of attribute future_value.



25
26
27
# File 'lib/eg/book/discount_group_ordered_list.rb', line 25

def future_value
  @future_value
end

#max_owingObject (readonly)

Returns the value of attribute max_owing.



26
27
28
# File 'lib/eg/book/discount_group_ordered_list.rb', line 26

def max_owing
  @max_owing
end

#min_purchaseObject (readonly)

Returns the value of attribute min_purchase.



26
27
28
# File 'lib/eg/book/discount_group_ordered_list.rb', line 26

def min_purchase
  @min_purchase
end

#orderObject (readonly)

Returns the value of attribute order.



25
26
27
# File 'lib/eg/book/discount_group_ordered_list.rb', line 25

def order
  @order
end

Class Method Details

.metadataObject



36
# File 'lib/eg/book/discount_group_ordered_list.rb', line 36

def OrderedDiscountGroup.; @@metadata; end