Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec_n/helpers/core_ext/string.rb

Instance Method Summary collapse

Instance Method Details

#all_digits?Boolean

Returns:

  • (Boolean)


3
4
5
# File 'lib/rspec_n/helpers/core_ext/string.rb', line 3

def all_digits?
  match?(/\A\d+\z/)
end

#remove_colorObject



7
8
9
# File 'lib/rspec_n/helpers/core_ext/string.rb', line 7

def remove_color
  gsub(/\e\[(\d|;)+m/, "")
end