Class: Eg::Book::OrderedDiscountGroup
- Inherits:
-
Object
- Object
- Eg::Book::OrderedDiscountGroup
- 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
-
#discount_percent ⇒ Object
readonly
Returns the value of attribute discount_percent.
-
#future_value ⇒ Object
readonly
Returns the value of attribute future_value.
-
#max_owing ⇒ Object
readonly
Returns the value of attribute max_owing.
-
#min_purchase ⇒ Object
readonly
Returns the value of attribute min_purchase.
-
#order ⇒ Object
readonly
Returns the value of attribute order.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(order, future_value, max_owing, min_purchase, discount_percent) ⇒ OrderedDiscountGroup
constructor
A new instance of OrderedDiscountGroup.
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_percent ⇒ Object (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_value ⇒ Object (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_owing ⇒ Object (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_purchase ⇒ Object (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 |
#order ⇒ Object (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
.metadata ⇒ Object
36 |
# File 'lib/eg/book/discount_group_ordered_list.rb', line 36 def OrderedDiscountGroup.; @@metadata; end |