Class: Integer

Inherits:
Object
  • Object
show all
Defined in:
lib/chars/extensions/integer.rb

Instance Method Summary collapse

Instance Method Details

#alpha?Boolean

Determines if the byte belongs to the alphabetic character set.

Returns:

  • (Boolean)

    Specifies whether the byte belongs to the alphabetic character set.

See Also:



113
114
115
# File 'lib/chars/extensions/integer.rb', line 113

def alpha?
  Chars::ALPHA.include_byte?(self)
end

#alpha_numeric?Boolean

Determines if the byte belongs to the alpha-numeric character set.

Returns:

  • (Boolean)

    Specifies whether the byte belongs to the alpha-numeric character set.

See Also:



126
127
128
# File 'lib/chars/extensions/integer.rb', line 126

def alpha_numeric?
  Chars::ALPHA_NUMERIC.include_byte?(self)
end

#ascii?Boolean

Determines if the byte belongs to the ASCII character set.

Returns:

  • (Boolean)

    Specifies whether the byte belongs to the ASCII character set.

See Also:



231
232
233
# File 'lib/chars/extensions/integer.rb', line 231

def ascii?
  Chars::ASCII.include_byte?(self)
end

#control?Boolean

Determines if the byte belongs to the control-character character set.

Returns:

  • (Boolean)

    Specifies whether the byte belongs to the control-character character set.

See Also:



205
206
207
# File 'lib/chars/extensions/integer.rb', line 205

def control?
  Chars::CONTROL.include_byte?(self)
end

#hex?Boolean

Determines if the byte belongs to the hexadecimal character set.

Returns:

  • (Boolean)

    Specifies whether the byte belongs to the hexadecimal character set.

See Also:



70
71
72
# File 'lib/chars/extensions/integer.rb', line 70

def hex?
  Chars::HEXADECIMAL.include_byte?(self)
end

#lowercase_alpha?Boolean

Determines if the byte belongs to the lower-case alphabetic character set.

Returns:

  • (Boolean)

    Specifies whether the byte belongs to the lower-case alphabetic character set.

See Also:



100
101
102
# File 'lib/chars/extensions/integer.rb', line 100

def lowercase_alpha?
  Chars::LOWERCASE_ALPHA.include_byte?(self)
end

#lowercase_hex?Boolean

Determines if the byte belongs to the lower-case hexadecimal character set.

Returns:

  • (Boolean)

    Specifies whether the byte belongs to the lower-case hexadecimal character set.

See Also:



57
58
59
# File 'lib/chars/extensions/integer.rb', line 57

def lowercase_hex?
  Chars::LOWERCASE_HEXADECIMAL.include_byte?(self)
end

#numeric?Boolean

Determines if the byte belongs to the decimal-digit character set.

Returns:

  • (Boolean)

    Specifies whether the byte belongs to the decimal-digit character set.

See Also:



14
15
16
# File 'lib/chars/extensions/integer.rb', line 14

def numeric?
  Chars::NUMERIC.include_byte?(self)
end

#octal?Boolean

Determines if the byte belongs to the octal-digit character set.

Returns:

  • (Boolean)

    Specifies whether the byte belongs to the octal-digit character set.

See Also:



27
28
29
# File 'lib/chars/extensions/integer.rb', line 27

def octal?
  Chars::OCTAL.include_byte?(self)
end

#printable?Boolean

Determines if the byte belongs to the printable character set.

Returns:

  • (Boolean)

    Specifies whether the byte belongs to the printable character set.

See Also:



191
192
193
# File 'lib/chars/extensions/integer.rb', line 191

def printable?
  Chars::PRINTABLE.include_byte?(self)
end

#punctuation?Boolean

Determines if the byte belongs to the punctuation character set.

Returns:

  • (Boolean)

    Specifies whether the byte belongs to the punctuation character set.

See Also:



139
140
141
# File 'lib/chars/extensions/integer.rb', line 139

def punctuation?
  Chars::PUNCTUATION.include_byte?(self)
end

#signed_ascii?Boolean

Determines if the byte belongs to the signed-ASCII character set.

Returns:

  • (Boolean)

    Specifies whether the byte belongs to the signed-ASCII character set.

See Also:



218
219
220
# File 'lib/chars/extensions/integer.rb', line 218

def signed_ascii?
  Chars::SIGNED_ASCII.include_byte?(self)
end

#space?Boolean

Determines if the byte belongs to the white-space character set.

Returns:

  • (Boolean)

    Specifies whether the byte belongs to the white-space character set.

See Also:



165
166
167
# File 'lib/chars/extensions/integer.rb', line 165

def space?
  Chars::SPACE.include_byte?(self)
end

#symbolic?Boolean

Determines if the byte belongs to the symbolic character set.

Returns:

  • (Boolean)

    Specifies whether the byte belongs to the symbolic character set.

See Also:



152
153
154
# File 'lib/chars/extensions/integer.rb', line 152

def symbolic?
  Chars::SYMBOLS.include_byte?(self)
end

#uppercase_alpha?Boolean

Determines if the byte belongs to the upper-case alphabetic character set.

Returns:

  • (Boolean)

    Specifies whether the byte belongs to the upper-case alphabetic character set.

See Also:



85
86
87
# File 'lib/chars/extensions/integer.rb', line 85

def uppercase_alpha?
  Chars::UPPERCASE_ALPHA.include_byte?(self)
end

#uppercase_hex?Boolean

Determines if the byte belongs to the upper-case hexadecimal character set.

Returns:

  • (Boolean)

    Specifies whether the byte belongs to the upper-case hexadecimal character set.

See Also:



42
43
44
# File 'lib/chars/extensions/integer.rb', line 42

def uppercase_hex?
  Chars::UPPERCASE_HEXADECIMAL.include_byte?(self)
end

#visible?Boolean

Determines if the byte belongs to the visible character set.

Returns:

  • (Boolean)

    Specifies whether the byte belongs to the visible character set.

See Also:



178
179
180
# File 'lib/chars/extensions/integer.rb', line 178

def visible?
  Chars::VISIBLE.include_byte?(self)
end