1
0
Fork 0
mirror of https://github.com/awesome-print/awesome_print synced 2023-03-27 23:22:34 -04:00

Created String Convenience Methods section

This commit is contained in:
George 2017-02-11 12:50:22 -08:00 committed by GitHub
parent 80ca06a7e6
commit 9e0d2a489f

View file

@ -72,13 +72,6 @@ Supported color names:
:black, :redish, :greenish, :yellowish, :blueish, :purpleish, :cyanish, :pale :black, :redish, :greenish, :yellowish, :blueish, :purpleish, :cyanish, :pale
``` ```
Use methods such as `.red` to set string color:
```ruby
irb> puts "red text".red
red text # (it's red)
```
Use `Object#ai` to return an ASCII encoded string: Use `Object#ai` to return an ASCII encoded string:
```ruby ```ruby
@ -312,6 +305,14 @@ formatting:
<%= ap @accounts.first, :html => true %> <%= ap @accounts.first, :html => true %>
### String Convenience Methods ###
Use methods such as `.red` to set string color:
```ruby
irb> puts "red text".red
red text # (it's red)
```
### Setting Custom Defaults ### ### Setting Custom Defaults ###
You can set your own default options by creating ``.aprc`` file in your home You can set your own default options by creating ``.aprc`` file in your home
directory. Within that file assign your defaults to ``AwesomePrint.defaults``. directory. Within that file assign your defaults to ``AwesomePrint.defaults``.