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:
parent
80ca06a7e6
commit
9e0d2a489f
1 changed files with 8 additions and 7 deletions
15
README.md
15
README.md
|
@ -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``.
|
||||||
|
|
Loading…
Reference in a new issue