Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/leeloo/command.rb

Instance Method Summary collapse

Instance Method Details

#truncate(max) ⇒ Object



5
6
7
# File 'lib/leeloo/command.rb', line 5

def truncate(max)
  length > max ? self[0...max] : self
end