Skip to content
This repository has been archived by the owner on Dec 2, 2018. It is now read-only.

eric1234/refactor-to-oo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OO rewrite of a "function" object anti-pattern

Demonstration of object-oriented programming vs the "function" objects as described by:

http://www.tomdalling.com/blog/ruby/pure-function-as-an-object-PFAAO-pattern/

Should work the same as the original code but more object-oriented.

Running The Code

First, install the dependencies with:

bundle install

Then run the code with:

bundle exec ruby convert.rb

Acknowledgements

The input.json data set comes from JSON Studio website:

http://jsonstudio.com/resources/

Not meant for any offense against individuals promoting this "object" functions like Tom (the original author before my refactor). We are are sharing ideas and I appreciate his contribution. Just trying to bring up a counter-point on why I think his method is an anti-pattern.

About

Counter-point to "function" object anti-pattern

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%