Skip to content

Commit

Permalink
fixup! Add
Browse files Browse the repository at this point in the history
```
lib/pry/helpers/text.rb:41:1: C: Layout/TrailingWhitespace: Trailing whitespace detected.
lib/pry/helpers/text.rb:50:16: C: Layout/SpaceBeforeBlockBraces: Space missing to the left of {.
          .then{ |it| bold ? bold(it) : it }
               ^
lib/pry/helpers/text.rb:51:16: C: Layout/SpaceBeforeBlockBraces: Space missing to the left of {.
          .then{ |it| send(color, it) }
```

...Well color me offended by that rule!
  • Loading branch information
joallard committed Aug 6, 2020
1 parent 241cf87 commit d3b5cb9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/pry/helpers/text.rb
Expand Up @@ -38,7 +38,7 @@ module Text
end
end
end

# Apply `color` and optional boldness to `text`
#
# @param color [Symbol] Color selected from `COLORS`
Expand All @@ -47,8 +47,8 @@ module Text
# @return [String] Text
def colorize(color, text, bold = false)
text
.then{ |it| bold ? bold(it) : it }
.then{ |it| send(color, it) }
.then { |it| bold ? bold(it) : it }
.then { |it| send(color, it) }
end

# Remove any color codes from _text_.
Expand Down

0 comments on commit d3b5cb9

Please sign in to comment.