Skip to main content

Ruby SDKs Are Now Ruby Style Guide Compliant

· One min read

APIMATIC's Ruby SDKs are now compliant with The Ruby Style Guide

  • Ruby style guide compliance means that the Ruby code generated is guaranteed to be of high-quality.
  • Ruby SDKs are written in an industry-standard code style to allow for maximum interoperability.
  • Ruby SDKs can be tested for code style violation using Rubocop.

Re-generate your Ruby SDKs now for the new changes.

Details

This change does not introduce any breaking changes in the Ruby SDKs.

Testing for Code Style using Rubocop

First you need to get the rubocop gem. You can install it using:

gem install rubocop

You can now test the SDK code for compliance with the Ruby Style Guide using:

rubocop

Exceptions

These rules are not enforced as they are dependent upon the endpoints in the API description:

  • ClassLength
  • MethodLength
  • BlockLength
  • ParameterLists
  • AbcSize
  • CyclomaticComplexity
  • PerceivedComplexity
  • AccessorMethodName

Variable names are prefixed with an underscore to avoid conflicts with Ruby keywords

  • UnderscorePrefixedVariableName