Create a new InterpolatedStringNode
node
Create a new InterpolatedSymbolNode
node
Create a new InterpolatedXStringNode
node
Create a new ItParametersNode
node
Create a new KeywordRestParameterNode
node
Create a new LocalVariableAndWriteNode
node
Create a new LocalVariableOrWriteNode
node
Create a new LocalVariableWriteNode
node
Create a new MultiTargetNode
node
Create a new NoKeywordsParameterNode
node
Create a new OptionalKeywordParameterNode
node
Create a new OptionalParameterNode
node
Create a new ParametersNode
node
Create a new ProgramNode
node
Create a new RangeNode
node
Create a new RequiredKeywordParameterNode
node
Create a new RequiredParameterNode
node
Create a new RescueModifierNode
node
Create a new RestParameterNode
node
Create a new SuperNode
node
Deserialize the AST represented by the given string into a parse result.
Generate a random alphanumeric string.
The argument n specifies the length, in characters, of the alphanumeric string to be generated. The argument chars specifies the character list which the result is consist of.
If n is not specified or is nil, 16 is assumed. It may be larger in the future.
The result may contain A-Z, a-z and 0-9, unless chars is specified.
require 'random/formatter' Random.alphanumeric #=> "2BuBuLf3WfSKyQbR" # or prng = Random.new prng.alphanumeric(10) #=> "i6K93NdqiH" Random.alphanumeric(4, chars: [*"0".."9"]) #=> "2952" # or prng = Random.new prng.alphanumeric(10, chars: [*"!".."/"]) #=> ",.,++%/''."