Class: Oag

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

Instance Method Summary collapse

Instance Method Details

#attachment_countObject



2
3
4
# File 'lib/oag.rb', line 2

def attachment_count
  self.assets.count
end

#total_memory_usedObject



6
7
8
9
10
11
12
# File 'lib/oag.rb', line 6

def total_memory_used
  memory = 0
  self.assets.each do |attachment|
    memory += attachment.attachment_file_size
  end
  memory
end