Skip to content

tomdalling/pure-function-as-an-object

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

Pure Function As An Object (PFAAO) Pattern Demonstration

This is a tiny project to demonstrate the PFAAO pattern. It converts a JSON document to an XML document. The accompanying article article is available here: http://www.rubypigeon.com/posts/the-pure-function-as-an-object-pfaao-pattern/

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/

This pattern is inspired and influenced by all of Rich Hickey's Clojure talks and Casey Muratori's API design talks.

About

An example Ruby program to demonstrate the "pure function as an object" pattern.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages