How rubymoney/money works
Project type and purpose
• This is a Ruby library (a gem) named Money for representing, manipulating, formatting, and converting monetary values. It is not a full-stack web app but a domain library with clear internal modules and extension points.
File structure
Top-level directories and files:
• lib/money – source code, subdivided into:
– bank (exchange logic: Base, SingleCurrency, VariableExchange)
– currency (currency metadata, loader, heuristics)
– locale_backend (formatting backends: I18n, legacy)
– money (core Money class: arithmetic, allocation, constructors, formatting)
– rates_store (in-memory store)
– version.rb
• config – JSON currency definitions (ISO, backward compatibility, non-ISO)
• sig – RBS signatures mirroring lib structure (for static typing)
• spec – RSpec tests covering every module
• Gemfile, Rakefile, README, CI workflows, LICENSE, etc.
README for additional insights
• Describes core features: Money and Currency classes, integer-cents storage, exchange via banks & stores, formatting backends, extensibility for custom banks or stores.