Ruby - Naming Convention - letter case for acronyms in class/module names?

前端 未结 3 2076
失恋的感觉
失恋的感觉 2021-01-04 01:20

I need to create a class that represent \"SVN\" inside a module called \"SCM\". But I don\'t know what is the convention when dealing with acronyms in Ruby, and could not fi

3条回答
  •  时光取名叫无心
    2021-01-04 01:51

    I think that SCM::SVN looks better (aesthetically), and I've seen libraries that use the same convention. It's really just a matter of what you think reads better.

    (However, note that if you are building a Rails project, and want this module to be autoloaded from the /lib directory, you may have to use Scm::Svn.)

提交回复
热议问题