What are mixins?

What exactly is a mixin? When are they used and what are they used for? They’re referred to often in the intermediate rails workshop regarding view helpers. But I’m also using Foundation and it seems like there are quite a few mixins available between foundation and rails.

Are foundation’s mixins defined the same way as rails’?

Thank you!

I think you might be confusing two different concepts with the same name.

Ruby mixins are described here: Programming Ruby: The Pragmatic Programmer's Guide

Mixins in Foundation (which I think are SASS mixins), are a bit different. Documentation on them is here: http://foundation.zurb.com/old-docs/f3/sass-mixins.php