Skip to content

Instantly share code, notes, and snippets.

@nfedyashev
Created October 24, 2020 05:22
Show Gist options
  • Save nfedyashev/8f2ba19067ce0204fabb6de9b87597e8 to your computer and use it in GitHub Desktop.
Save nfedyashev/8f2ba19067ce0204fabb6de9b87597e8 to your computer and use it in GitHub Desktop.

The simplest implementation might look like this:

class ArrayUtils def self.multiplos(num, step) step.step(num * step, step).to_a end end

but you may need to add some additional checks for input arguments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment