attr_accessor
定义非常大的常量或符号时应该怎么做?例如,像这样:
ATTRIBUTES = %w(id name full_name owner private html_url description fork url forks_url keys_url collaborators_url teams_url hooks_url issue_events_url events_url assignees_url branches_url tags_url blobs_url git_tags_url git_refs_url trees_url statuses_url languages_url stargazers_url contributors_url subscribers_url subscription_url commits_url git_commits_url comments_url issue_comment_url contents_url compare_url merges_url archive_url downloads_url issues_url pulls_url milestones_url)
attr_accessor :name, :login, :full_name, :owner, :private, :html_url, :description, :fork, :url
在课堂上是可怕的。这是最好的方法吗?我想知道是否还有其他方法可以提高可读性。