senooken JP Social
  • FAQ
  • Login
senooken JP Socialはsenookenの専用分散SNSです。
  • Public

    • Public
    • Network
    • Groups
    • Popular
    • People

Conversation

Notices

  1. のら (noraworld@mastodon.noraworld.jp)'s status on Thursday, 18-Oct-2018 23:48:16 JST のら のら

    Ruby で、if の条件式が長すぎて複数行にしたいときの RuboCop や Ruby スタイルガイド的なコーディングルールがわからない ?

    In conversation Thursday, 18-Oct-2018 23:48:16 JST from mastodon.noraworld.jp permalink
    • のら (noraworld@mastodon.noraworld.jp)'s status on Friday, 19-Oct-2018 00:04:24 JST のら のら
      in reply to

      RuboCop の Ruby Style Guide には if の条件式を複数行に渡って書く場合の例が、ざっと見た感じ見当たらなかったなー

      https://github.com/rubocop-hq/ruby-style-guide

      In conversation Friday, 19-Oct-2018 00:04:24 JST permalink
    • のら (noraworld@mastodon.noraworld.jp)'s status on Friday, 19-Oct-2018 00:07:33 JST のら のら
      in reply to

      RuboCop のほうは見つからなかったけど、Airbnb の Ruby Style Guide には書いてあった!

      https://github.com/airbnb/ruby#newlines

      if の条件式が複数行にまたがるときは、if の中身と条件式の間に空行を入れましょう、とのこと

      なるほどー!!

      In conversation Friday, 19-Oct-2018 00:07:33 JST permalink
    • のら (noraworld@mastodon.noraworld.jp)'s status on Friday, 19-Oct-2018 00:09:55 JST のら のら
      in reply to

      Airbnb の Ruby Style Guide に従ってみようかなー

      In conversation Friday, 19-Oct-2018 00:09:55 JST permalink

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

senooken JP Social is a social network, courtesy of senooken. It runs on GNU social, version 2.0.2-beta0, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All senooken JP Social content and data are available under the Creative Commons Attribution 3.0 license.