GithubHelp home page GithubHelp logo

paypal's Introduction

Basic Credit Card Processing

by Prateep Kul

Overview of code design

  • Follow instruction with open case for new assignment
    • For example:
      • Instead of check case 'Charge' || 'Credit' in one case to save coding, then still keep it as seperate case for future expansion
  • Platform: ruby which can be config to have both call from
    • command line and
    • STDIO both Mac and Linux
  • Use simple array functions that most languages provided for easy understand

Installation:

  • This code develop in Mac using Ruby version 2.6, however any ruby in others platform should work.
  • Using Gemfile with bundle for easy install required gems in this version and/or future development.

How to run this code

For example: input file name are input1.txt, input2.txt

  • Run as normal ruby command
      ruby myprogram.rb input1.txt input2.txt
  • Run via command arguments
      ./myprogram input1.txt input2.txt
  • input read from STDIN, like:
      ./myprogram < input1.txt
      ./myprogram < input1.txt

How to test

Test logic to get result as expect from input file

  • Input data use file input.txt
  • Test with Rspec
  • use guard while working (TDD)

To Test run

$ guard

or

$ rspec

paypal's People

Contributors

kul1 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.