lib/chars/chars.rb in chars-0.2.3 vs lib/chars/chars.rb in chars-0.2.4

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + require 'chars/char_set' module Chars # The numeric decimal character set NUMERIC = CharSet['0'..'9'] @@ -37,11 +39,11 @@ '@', '#', '$', '%', '^', '&', '*', '_', '+', '=', '|', '\\', '<', '>', '/' ] # The space character set - SPACE = CharSet.new(' ', "\f", "\n", "\r", "\t", "\v") + SPACE = CharSet[' ', "\f", "\n", "\r", "\t", "\v"] # The set of printable characters (not including spaces) VISIBLE = ALPHA_NUMERIC | CharSet[ '\'', '"', '`', ',', ';', ':', '~', '-', '(', ')', '[', ']', '{', '}', '.', '?', '!', '@', '#', '$', @@ -64,169 +66,203 @@ # The decimal-digit character set. # # @return [CharSet] # The decimal-digit character set. # - def Chars.numeric + # @see NUMERIC + # + def self.numeric NUMERIC end # # The octal-digit character set. # # @return [CharSet] # The octal-digit character set. # - def Chars.octal + # @see OCTAL + # + def self.octal OCTAL end # # The upper-case hexadecimal character set. # # @return [CharSet] # The upper-case hexadecimal character set. # - def Chars.uppercase_hexadecimal + # @see UPPERCASE_HEXADECIMAL + # + def self.uppercase_hexadecimal UPPERCASE_HEXADECIMAL end # # The lower-case hexadecimal character set. # # @return [CharSet] # The lower-case hexadecimal character set. # - def Chars.lowercase_hexadecimal + # @see LOWERCASE_HEXADECIMAL + # + def self.lowercase_hexadecimal LOWERCASE_HEXADECIMAL end # # The hexadecimal character set. # # @return [CharSet] # The hexadecimal character set. # - def Chars.hexadecimal + # @see HEXADECIMAL + # + def self.hexadecimal HEXADECIMAL end # # The upper-case alphabetic character set. # # @return [CharSet] # The upper-case alphabetic character set. # - def Chars.uppercase_alpha + # @see UPPERCASE_ALPHA + # + def self.uppercase_alpha UPPERCASE_ALPHA end # # The lower-case alphabetic character set. # # @return [CharSet] # The lower-case alphabetic character set. # - def Chars.lowercase_alpha + # @see LOWERCASE_ALPHA + # + def self.lowercase_alpha LOWERCASE_ALPHA end # # The alphabetic character set. # # @return [CharSet] # The alphabetic character set. # - def Chars.alpha + # @see ALPHA + # + def self.alpha ALPHA end # # The alpha-numeric character set. # # @return [CharSet] # The alpha-numeric character set. # - def Chars.alpha_numeric + # @see ALPHA_NUMERIC + # + def self.alpha_numeric ALPHA_NUMERIC end # # The punctuation character set. # # @return [CharSet] # The punctuation character set. # - def Chars.punctuation + # @see PUNCTUATION + # + def self.punctuation PUNCTUATION end # # The symbolic character set. # # @return [CharSet] # The symbolic character set. # - def Chars.symbols + # @see SYMBOLS + # + def self.symbols SYMBOLS end # # The white-space character set. # # @return [CharSet] # The white-space character set. # - def Chars.space + # @see SPACE + # + def self.space SPACE end # # The set of printable characters, not including spaces. # # @return [CharSet] # The visible character set. # - def Chars.visible + # @see VISIBLE + # + def self.visible VISIBLE end # # The set of printable characters, including spaces. # # @return [CharSet] # The printable character set. # - def Chars.printable + # @see PRINTABLE + # + def self.printable PRINTABLE end # # The control-character character set. # # @return [CharSet] # The control-character character set. # - def Chars.control + # @see CONTROL + # + def self.control CONTROL end # # The signed ASCII character set. # # @return [CharSet] # The signed ASCII character set. # - def Chars.signed_ascii + # @see SIGNED_ASCII + # + def self.signed_ascii SIGNED_ASCII end # # The ASCII character set. # # @return [CharSet] # The ASCII character set. # - def Chars.ascii + # @see ASCII + # + def self.ascii ASCII end end