Class: MyLogger
Instance Method Summary collapse
- #cartInformation(cart) ⇒ Object
-
#initialize ⇒ MyLogger
constructor
A new instance of MyLogger.
- #logInformation(login) ⇒ Object
- #orderInformation(order) ⇒ Object
- #paymentInformation(payment) ⇒ Object
- #productInformation(product) ⇒ Object
- #profileInformation(profile) ⇒ Object
- #storeInformation(store) ⇒ Object
Constructor Details
#initialize ⇒ MyLogger
Returns a new instance of MyLogger.
8 9 10 |
# File 'lib/pizza_app_logger.rb', line 8 def initialize @log = File.open("pizzalog.txt", "a") end |
Instance Method Details
#cartInformation(cart) ⇒ Object
37 38 39 40 |
# File 'lib/pizza_app_logger.rb', line 37 def cartInformation(cart) @log.puts("cart : " + cart) @log.flush end |
#logInformation(login) ⇒ Object
12 13 14 15 |
# File 'lib/pizza_app_logger.rb', line 12 def logInformation(login) @log.puts("login : " + login) @log.flush end |
#orderInformation(order) ⇒ Object
32 33 34 35 |
# File 'lib/pizza_app_logger.rb', line 32 def orderInformation(order) @log.puts("order : " + order) @log.flush end |
#paymentInformation(payment) ⇒ Object
43 44 45 46 |
# File 'lib/pizza_app_logger.rb', line 43 def paymentInformation(payment) @log.puts("payment : " + payment) @log.flush end |
#productInformation(product) ⇒ Object
27 28 29 30 |
# File 'lib/pizza_app_logger.rb', line 27 def productInformation(product) @log.puts("product : " + product) @log.flush end |
#profileInformation(profile) ⇒ Object
17 18 19 20 |
# File 'lib/pizza_app_logger.rb', line 17 def profileInformation(profile) @log.puts("profile : " + profile) @log.flush end |
#storeInformation(store) ⇒ Object
22 23 24 25 |
# File 'lib/pizza_app_logger.rb', line 22 def storeInformation(store) @log.puts("store : " + store) @log.flush end |