Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/forgetful-git/common/string.rb

Instance Method Summary collapse

Instance Method Details

#basenameObject



14
15
16
# File 'lib/forgetful-git/common/string.rb', line 14

def basename
    `basename "#{self}"`.trim
end

#blueObject



26
27
28
# File 'lib/forgetful-git/common/string.rb', line 26

def blue
    colorize(34)
end

#explodeObject



6
7
8
# File 'lib/forgetful-git/common/string.rb', line 6

def explode
    self.split("\n")
end

#greenObject



22
23
24
# File 'lib/forgetful-git/common/string.rb', line 22

def green
    colorize(32)
end

#split_dirObject



10
11
12
# File 'lib/forgetful-git/common/string.rb', line 10

def split_dir
    self.sub(":", "\n")
end

#trimObject



2
3
4
# File 'lib/forgetful-git/common/string.rb', line 2

def trim
    self.sub("\n", "")
end

#yellowObject



18
19
20
# File 'lib/forgetful-git/common/string.rb', line 18

def yellow
    colorize(33)
end