class RBT::Gobolinux::NamingConvention
Public Class Methods
[](i = '')
click to toggle source
Public Instance Methods
input?()
click to toggle source
reset()
click to toggle source
run()
click to toggle source
#¶ ↑
run (run tag)¶ ↑
#¶ ↑
# File lib/rbt/linux/gobolinux/gobolinux_naming_convention.rb, line 78 def run _ = @input.downcase.dup if _.include? 'lib' _.gsub!(/lib/,'Lib') end if _.include? 'bin' _.gsub!(/bin/,'Bin') end if _.size < 4 _.upcase! end # ======================================================================= # # === Check for stuff such as "libdrm", which will become "LibDRM". # ======================================================================= # if _.start_with? 'Lib' and _.size == 6 _[-3,3] = _[-3,3].upcase end if _.include? 'info' _.sub!(/info/,'INFO') end if _.include? '-' splitted = _.split('-') splitted.map {|entry| entry[0,1] = entry[0,1].upcase entry } _ = splitted.join('-') end # ======================================================================= # # The first character will ALWAYS be upcased, no matter what. # ======================================================================= # _[0,1] = _[0,1].upcase set_translated_name(_) end
set_input(i = '')
click to toggle source
set_translated_name(i)
click to toggle source