<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                # Newlines style guide > 原文:[https://docs.gitlab.com/ee/development/newlines_styleguide.html](https://docs.gitlab.com/ee/development/newlines_styleguide.html) * [Rule: separate code with newlines only to group together related logic](#rule-separate-code-with-newlines-only-to-group-together-related-logic) * [Rule: separate code and block with newlines](#rule-separate-code-and-block-with-newlines) * [Newline before block](#newline-before-block) * [Newline after block](#newline-after-block) * [Exception: no need for newline when code block starts or ends right inside another code block](#exception-no-need-for-newline-when-code-block-starts-or-ends-right-inside-another-code-block) # Newlines style guide[](#newlines-style-guide "Permalink") 該樣式指南為 Ruby 代碼中的換行符推薦了最佳做法. ## Rule: separate code with newlines only to group together related logic[](#rule-separate-code-with-newlines-only-to-group-together-related-logic "Permalink") ``` # bad def method issue = Issue.new issue.save render json: issue end ``` ``` # good def method issue = Issue.new issue.save render json: issue end ``` ## Rule: separate code and block with newlines[](#rule-separate-code-and-block-with-newlines "Permalink") ### Newline before block[](#newline-before-block "Permalink") ``` # bad def method issue = Issue.new if issue.save render json: issue end end ``` ``` # good def method issue = Issue.new if issue.save render json: issue end end ``` ## Newline after block[](#newline-after-block "Permalink") ``` # bad def method if issue.save issue.send_email end render json: issue end ``` ``` # good def method if issue.save issue.send_email end render json: issue end ``` ### Exception: no need for newline when code block starts or ends right inside another code block[](#exception-no-need-for-newline-when-code-block-starts-or-ends-right-inside-another-code-block "Permalink") ``` # bad def method if issue if issue.valid? issue.save end end end ``` ``` # good def method if issue if issue.valid? issue.save end end end ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看