class TranscationAPI

Public Class Methods

get_list() click to toggle source
# File lib/TranscationAPI.rb, line 21
def self.get_list
  @@list
end
record(transcation) click to toggle source
# File lib/TranscationAPI.rb, line 13
def self.record(transcation)
  @@list ||= Array.new
  transcation[:id] = @@list.size
  @@list.push(transcation)
  puts "TranscationAPI#record: Recording a transcation with these details: #{transcation}"
  add_line(@@file_path, transcation)
end
seed() click to toggle source
# File lib/TranscationAPI.rb, line 9
def self.seed
  @@list = read_file(@@file_path)
end