Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/forgetful-git/common/string.rb
Instance Method Summary collapse
- #basename ⇒ Object
- #blue ⇒ Object
- #explode ⇒ Object
- #green ⇒ Object
- #split_dir ⇒ Object
- #trim ⇒ Object
- #yellow ⇒ Object
Instance Method Details
#basename ⇒ Object
14 15 16 |
# File 'lib/forgetful-git/common/string.rb', line 14 def basename `basename "#{self}"`.trim end |
#blue ⇒ Object
26 27 28 |
# File 'lib/forgetful-git/common/string.rb', line 26 def blue colorize(34) end |
#explode ⇒ Object
6 7 8 |
# File 'lib/forgetful-git/common/string.rb', line 6 def explode self.split("\n") end |
#green ⇒ Object
22 23 24 |
# File 'lib/forgetful-git/common/string.rb', line 22 def green colorize(32) end |
#split_dir ⇒ Object
10 11 12 |
# File 'lib/forgetful-git/common/string.rb', line 10 def split_dir self.sub(":", "\n") end |
#trim ⇒ Object
2 3 4 |
# File 'lib/forgetful-git/common/string.rb', line 2 def trim self.sub("\n", "") end |
#yellow ⇒ Object
18 19 20 |
# File 'lib/forgetful-git/common/string.rb', line 18 def yellow colorize(33) end |