Skip to content

Instantly share code, notes, and snippets.

@ClayShentrup
Created February 14, 2017 06:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ClayShentrup/e3b51787c57d855a473494960bdc2ced to your computer and use it in GitHub Desktop.
Save ClayShentrup/e3b51787c57d855a473494960bdc2ced to your computer and use it in GitHub Desktop.
Example of a map for https://medium.com/p/f6763b23f76e
shock_cost_class_map = {
front: FrontShockCost,
lefty: LeftyShockCost,
rear: RearSHockCost,
}
shock_cost_class = shock_cost_class_map.fetch(type, ShockCost)
shock_cost_class.new.compute
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment