Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/eric_tools/string.rb
Instance Method Summary collapse
- #show_simple_with_points ⇒ Object (also: #simple)
- #to_debug ⇒ Object
- #to_logger ⇒ Object (also: #to_info)
Instance Method Details
#show_simple_with_points ⇒ Object 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_debug ⇒ Object
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_logger ⇒ Object 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 |