Module: Jaina::Parser::Tokenizer::TokenBuilder::ArgumentTypeCaster Private

Defined in:
lib/jaina/parser/tokenizer/token_builder/argument_type_caster.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Since:

  • 0.4.0

Constant Summary collapse

INTEGER_PATTERN =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Returns:

  • (Regexp)

Since:

  • 0.4.0

/\A\d+\z/.freeze
FLOAT_PATTERN =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Returns:

  • (Regexp)

Since:

  • 0.4.0

/\A\d+\.\d+\z/.freeze
TRUE_PATTERN =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Returns:

  • (Regexp)

Since:

  • 0.4.0

/\A(t|true)\z/i.freeze
FALSE_PATTERN =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Returns:

  • (Regexp)

Since:

  • 0.4.0

/\A(f|false)\z/i.freeze
ARRAY_PATTERN =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Returns:

  • (Regexp)

Since:

  • 0.4.0

/\A[^'"].*\s*,\s*.*[^'"]\z/.freeze
QUOTED_STRING_PATTERN =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Returns:

  • (Regexp)

Since:

  • 0.4.0

/\A['"].*['"]\z/.freeze

Class Method Summary collapse

Class Method Details

.cast(*arguments) ⇒ Array<Any>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

  • arguments (Array<String>)

Returns:

  • (Array<Any>)

Since:

  • 0.4.0



48
49
50
# File 'lib/jaina/parser/tokenizer/token_builder/argument_type_caster.rb', line 48

def cast(*arguments)
  arguments.map { |argument| cast_argument_type(argument) }
end