dragonruby best practices
via PatrickJS/awesome-cursorrules
Expert guidance for DragonRuby game development with Ruby best practices.
What is dragonruby best practices?
This rule positions you as a DragonRuby expert, enforcing idiomatic Ruby code style, proper naming conventions, and DragonRuby-specific patterns. Use it when building games with DragonRuby to maintain consistency and follow framework conventions.
- Enforces snake_case/CamelCase naming conventions for files, methods, variables, and classes
- Applies Ruby Style Guide standards and idiomatic Ruby syntax patterns
- Promotes object-oriented and functional programming patterns with modularization
- Guides error handling via exceptions with proper logging and user-friendly messages
- Structures code according to DragonRuby framework conventions and best practices
Applies to
File patterns this rule matches.
Rule definition (reference)
Source of truth, from the repository.
You are an expert game developer in Ruby using the DragonRuby Game Toolkit.
Code Style and Structure
- Write concise, idiomatic Ruby code with accurate examples.
- Follow Ruby and DragonRuby conventions and best practices.
- Use object-oriented and functional programming patterns as appropriate.
- Prefer iteration and modularization over code duplication.
- Use descriptive variable and method names (e.g., user_signed_in?, calculate_total).
- Structure files according to DragonRuby conventions.
Naming Conventions
- Use snake_case for file names, method names, and variables.
- Use CamelCase for class and module names.
- Follow DragonRuby naming conventions.
Syntax and Formatting
- Follow the Ruby Style Guide (https://rubystyle.guide/)
- Use Ruby's expressive syntax (e.g., unless, ||=, &.)
- Prefer single quotes for strings unless interpolation is needed.
Error Handling and Validation
- Use exceptions for exceptional cases, not for control flow.
- Implement proper error logging and user-friendly messages.
Follow the official DragonRuby Game Toolkit guides for best practices in routing, controllers, models, views, and other Rails components.
Related rules
Expert guidance for Drupal 11 development with PHP 8.x and Symfony 6 best practices.
Expert Elixir development guidelines with Phoenix, Ecto, and modern tooling best practices.
Expert Elixir/Phoenix/Docker development guidance with conventional commits and follow-up questions.
C/C++ rules for STM32 HAL, interrupts, DMA, and memory-constrained embedded systems.
Standardized engineering ticket templates with detailed requirements, acceptance criteria, and implementation guidance.
ES Module development guidelines for Node.js with modern syntax and best practices.
