Sha256: 26c4d7644e01889a093c6214d5747863930e21926fd7010128b6e74c042fee5a

Contents?: true

Size: 146 Bytes

Versions: 14

Compression:

Stored size: 146 Bytes

Contents

class String
  def just(pad, max)
    return self.ljust(max, pad) if length <= max
    return "#{self[0..(max - 3)]}.." if length > max
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
rundock-1.2.1 lib/rundock/ext/string.rb
rundock-1.2.0 lib/rundock/ext/string.rb
rundock-1.1.7 lib/rundock/ext/string.rb
rundock-1.1.6 lib/rundock/ext/string.rb
rundock-1.1.5 lib/rundock/ext/string.rb
rundock-1.1.4 lib/rundock/ext/string.rb
rundock-1.1.3 lib/rundock/ext/string.rb
rundock-1.1.2 lib/rundock/ext/string.rb
rundock-1.1.1 lib/rundock/ext/string.rb
rundock-1.1.0 lib/rundock/ext/string.rb
rundock-1.0.8 lib/rundock/ext/string.rb
rundock-1.0.7 lib/rundock/ext/string.rb
rundock-1.0.6 lib/rundock/ext/string.rb
rundock-1.0.5 lib/rundock/ext/string.rb