Module: Ronin::Support::Text::Random::Mixin
- Included in:
- Mixin
- Defined in:
- lib/ronin/support/text/random/mixin.rb
Overview
A mixin for generating random text.
Instance Method Summary collapse
-
#random_alpha(n = 1) ⇒ String
A random alphabetic string.
-
#random_alpha_numeric(n = 1) ⇒ String
A random alpha-numeric string.
-
#random_ascii(n = 1) ⇒ String
A random ASCII string.
-
#random_control(n = 1) ⇒ String
A random control-character string.
-
#random_hex(n = 1) ⇒ String
A random hexadecimal string.
-
#random_lowercase_alpha(n = 1) ⇒ String
(also: #random_lower_alpha)
The lower-case alphabetic character set.
-
#random_lowercase_hex(n = 1) ⇒ String
(also: #random_lower_hex)
The lower-case hexadecimal character set.
-
#random_numeric(n = 1) ⇒ String
(also: #random_digits)
Generates a random String of numeric characters.
-
#random_octal(n = 1) ⇒ String
A random octal-digit string.
-
#random_printable(n = 1) ⇒ String
The set of printable characters, including spaces.
-
#random_punctuation(n = 1) ⇒ String
A random punctuation string.
-
#random_signed_ascii(n = 1) ⇒ String
The signed ASCII character set.
-
#random_symbols(n = 1) ⇒ String
A random symbolic string.
-
#random_uppercase_alpha(n = 1) ⇒ String
(also: #random_upper_alpha)
The upper-case alphabetic character set.
-
#random_uppercase_hex(n = 1) ⇒ String
(also: #random_upper_hex)
The upper-case hexadecimal character set.
-
#random_visible(n = 1) ⇒ String
The set of printable characters, not including spaces.
-
#random_whitespace(n = 1) ⇒ String
(also: #random_space)
A random whitespace string.
Instance Method Details
#random_alpha(n = 1) ⇒ String
A random alphabetic string.
221 222 223 |
# File 'lib/ronin/support/text/random/mixin.rb', line 221 def random_alpha(n=1) Text::Random.alpha(n) end |
#random_alpha_numeric(n = 1) ⇒ String
A random alpha-numeric string.
244 245 246 |
# File 'lib/ronin/support/text/random/mixin.rb', line 244 def random_alpha_numeric(n=1) Text::Random.alpha_numeric(n) end |
#random_ascii(n = 1) ⇒ String
A random ASCII string.
430 431 432 |
# File 'lib/ronin/support/text/random/mixin.rb', line 430 def random_ascii(n=1) Text::Random.ascii(n) end |
#random_control(n = 1) ⇒ String
A random control-character string.
384 385 386 |
# File 'lib/ronin/support/text/random/mixin.rb', line 384 def random_control(n=1) Text::Random.control(n) end |
#random_hex(n = 1) ⇒ String
A random hexadecimal string.
148 149 150 |
# File 'lib/ronin/support/text/random/mixin.rb', line 148 def random_hex(n=1) Text::Random.hex(n) end |
#random_lowercase_alpha(n = 1) ⇒ String Also known as: random_lower_alpha
The lower-case alphabetic character set.
196 197 198 |
# File 'lib/ronin/support/text/random/mixin.rb', line 196 def random_lowercase_alpha(n=1) Text::Random.lowercase_alpha(n) end |
#random_lowercase_hex(n = 1) ⇒ String Also known as: random_lower_hex
The lower-case hexadecimal character set.
123 124 125 |
# File 'lib/ronin/support/text/random/mixin.rb', line 123 def random_lowercase_hex(n=1) Text::Random.lowercase_hex(n) end |
#random_numeric(n = 1) ⇒ String Also known as: random_digits
Generates a random String of numeric characters.
50 51 52 |
# File 'lib/ronin/support/text/random/mixin.rb', line 50 def random_numeric(n=1) Text::Random.numeric(n) end |
#random_octal(n = 1) ⇒ String
A random octal-digit string.
75 76 77 |
# File 'lib/ronin/support/text/random/mixin.rb', line 75 def random_octal(n=1) Text::Random.octal(n) end |
#random_printable(n = 1) ⇒ String
The set of printable characters, including spaces.
361 362 363 |
# File 'lib/ronin/support/text/random/mixin.rb', line 361 def random_printable(n=1) Text::Random.printable(n) end |
#random_punctuation(n = 1) ⇒ String
A random punctuation string.
267 268 269 |
# File 'lib/ronin/support/text/random/mixin.rb', line 267 def random_punctuation(n=1) Text::Random.punctuation(n) end |
#random_signed_ascii(n = 1) ⇒ String
The signed ASCII character set.
407 408 409 |
# File 'lib/ronin/support/text/random/mixin.rb', line 407 def random_signed_ascii(n=1) Text::Random.signed_ascii(n) end |
#random_symbols(n = 1) ⇒ String
A random symbolic string.
290 291 292 |
# File 'lib/ronin/support/text/random/mixin.rb', line 290 def random_symbols(n=1) Text::Random.symbols(n) end |
#random_uppercase_alpha(n = 1) ⇒ String Also known as: random_upper_alpha
The upper-case alphabetic character set.
171 172 173 |
# File 'lib/ronin/support/text/random/mixin.rb', line 171 def random_uppercase_alpha(n=1) Text::Random.uppercase_alpha(n) end |
#random_uppercase_hex(n = 1) ⇒ String Also known as: random_upper_hex
The upper-case hexadecimal character set.
98 99 100 |
# File 'lib/ronin/support/text/random/mixin.rb', line 98 def random_uppercase_hex(n=1) Text::Random.uppercase_hex(n) end |
#random_visible(n = 1) ⇒ String
The set of printable characters, not including spaces.
338 339 340 |
# File 'lib/ronin/support/text/random/mixin.rb', line 338 def random_visible(n=1) Text::Random.visible(n) end |
#random_whitespace(n = 1) ⇒ String Also known as: random_space
A random whitespace string.
313 314 315 |
# File 'lib/ronin/support/text/random/mixin.rb', line 313 def random_whitespace(n=1) Text::Random.whitespace(n) end |