Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/eric_tools/string.rb

Instance Method Summary collapse

Instance Method Details

#show_simple_with_pointsObject Also known as: simple



14
15
16
17
18
19
20
# File 'lib/eric_tools/string.rb', line 14

def show_simple_with_points
  return '' if self.blank?
  max = 10
  introduce = self[0, max]
  introduce += '...' if self.size > max
  introduce
end

#to_debugObject



7
8
9
10
# File 'lib/eric_tools/string.rb', line 7

def to_debug
  ::ApplicationController.logger.debug self
  ::ApplicationController.logger.debug "\n"
end

#to_loggerObject Also known as: to_info



2
3
4
5
# File 'lib/eric_tools/string.rb', line 2

def to_logger
  ::ApplicationController.logger.info self
  ::ApplicationController.logger.info "\n"
end