title: String in alphabetical order Ruby
body: <p>I am new to Ruby. I have written a solution in Java </p>
  
  <pre><code>public boolean checkOrder(String input) {
          boolean x = false;
          for (int i = 0; i &lt; input.length() - 1; i++) {
              if (input.charAt(i) &lt; input.charAt(i + 1) || input.charAt(i) == input.charAt(i + 1)) {
                  x = true;
              } else {
                  return false;
              }
          }
          return x;
  
      }
  </code></pre>
  
  <p>I want to do the same in ruby how can I convert the same into ruby. Thanks.</p>