Class: OrderReview

Inherits:
Object
  • Object
show all
Defined in:
lib/order_review.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#pageObject

Returns the value of attribute page.



3
4
5
# File 'lib/order_review.rb', line 3

def page
  @page
end

#total_priceObject

Returns the value of attribute total_price.



4
5
6
# File 'lib/order_review.rb', line 4

def total_price
  @total_price
end

#total_price_without_taxObject

Returns the value of attribute total_price_without_tax.



4
5
6
# File 'lib/order_review.rb', line 4

def total_price_without_tax
  @total_price_without_tax
end

Instance Method Details

#displayObject



6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/order_review.rb', line 6

def display
  puts
  puts
  puts "Review Your Order".colorize(:red)

  source = page || default_page

  # Order items
  puts OrderItems.from(source)
  puts CouponItems.from(source)

  # General information
  puts retrieve_prices(source)
end