Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/awsutils/ec2info.rb

Instance Method Summary collapse

Instance Method Details

#longestObject



29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/awsutils/ec2info.rb', line 29

def longest
  length = 0
  val = ''
  each do |a|
    len_new = a.length
    if len_new > length
      length = len_new
      val = a
    end
  end
  val
end