What is the favorable naming convention for methods or properties returning a boolean value in Ruby? -


i've seen of these:

  • is_valid

  • is_valid?

  • valid?

is there preferred one?

edit: more conditionals:

  • has_comment has_comment? comment?

  • was_full was_full? full?

please add more descriptive examples.

i think convention add '?' @ end of method instead of 'is'

  • valid?

Comments

Popular posts from this blog

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

c# - Making TableLayoutPanel Act Like An HTML Table (Cells That Resize Automatically Around Text) -