Why this matters
Structs are faster, lighter, and define a stable API.
Prefer Struct (or value objects) over OpenStruct for performance and type clarity.
Structs are faster, lighter, and define a stable API.
Side-by-side examples engineers can pattern-match during review.
row = OpenStruct.new(name: "A", price: 10)Row = Struct.new(:name, :price, keyword_init: true)
row = Row.new(name: "A", price: 10)OpenStruct.new(...)Struct.new(:a, :b)From the same buckets as this rule.
All static JS/CSS/font/image files MUST use content-hashed filenames (e.g., app.9c1a7b.js) and be served with "Cache-Control: public, max-age=31536000, immutable". HTML and other non-fingerprinted documents MUST be served with "Cache-Control: no-cache" (or equivalent) to enable conditional revalidation.