File: helper.rb

package info (click to toggle)
ruby-aliyun-sdk 0.8.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 792 kB
  • sloc: ruby: 7,909; ansic: 204; makefile: 4
file content (15 lines) | stat: -rw-r--r-- 270 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# -*- encoding: utf-8 -*-

module Aliyun
  module Test
    module Helper
      def random_string(n)
        (1...n).map { (65 + rand(26)).chr }.join + "\n"
      end

      def random_bytes(n)
        (1...n).map { rand(255).chr }.join + "\n"
      end
    end
  end
end