Bird
0
0

According to the Ruby style guide essentials, which naming convention should you use for method names?

easy📝 Conceptual Q11 of 15
Ruby - Ecosystem and Best Practices
According to the Ruby style guide essentials, which naming convention should you use for method names?
Asnake_case
BCamelCase
Ckebab-case
DPascalCase
Step-by-Step Solution
Solution:
  1. Step 1: Understand method naming conventions

    Ruby style guide recommends using snake_case for method names to improve readability.
  2. Step 2: Compare options with style guide

    CamelCase and PascalCase are used for classes and modules, not methods.
  3. Final Answer:

    snake_case -> Option A
  4. Quick Check:

    Method names use snake_case [OK]
Quick Trick: Methods and variables use snake_case, classes use CamelCase [OK]
Common Mistakes:
  • Using CamelCase for method names
  • Using kebab-case which is invalid in Ruby
  • Confusing class naming with method naming

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Ruby Quizzes