Gem Structure
Files and gemspec.
What Is a Gem?
A gem is a packaged Ruby library or application that can be installed, versioned, and shared through RubyGems. Almost every Ruby tool you use is a gem.
- A gem bundles code, metadata, and dependencies.
- The metadata lives in a gemspec file.
- Tools like
bundlerandgemmanage gems.
Generating a Skeleton
The fastest start is bundle gem mygem. It scaffolds the standard directory layout, a gemspec, a test folder, a README, and a license. You then fill in the code.