Class: Postmark::Mitt::AttachmentsArray

Inherits:
Array
  • Object
show all
Defined in:
lib/postmark/mitt.rb

Instance Method Summary collapse

Instance Method Details

#largestObject



140
141
142
# File 'lib/postmark/mitt.rb', line 140

def largest
  sorted.last
end

#smallestObject



144
145
146
# File 'lib/postmark/mitt.rb', line 144

def smallest
  sorted.first
end

#sortedObject



136
137
138
# File 'lib/postmark/mitt.rb', line 136

def sorted
  @sorted ||= self.sort{|x,y|x.size <=> y.size}
end