Class: Backup::LoadFromFiles::EntryFile

Inherits:
DataFile
  • Object
show all
Defined in:
lib/backup/load_from_files.rb

Instance Attribute Summary

Attributes inherited from DataFile

#content

Instance Method Summary collapse

Methods inherited from DataFile

#full_hash, #initialize, #table_name, #table_name_sym

Constructor Details

This class inherits a constructor from Backup::LoadFromFiles::DataFile

Instance Method Details

#entriesObject



42
43
44
# File 'lib/backup/load_from_files.rb', line 42

def entries
  full_hash[:data]
end

#idsObject



34
35
36
# File 'lib/backup/load_from_files.rb', line 34

def ids
  @content.scan(/"id":\s?(\d+)/).flatten.map(&:to_i)
end

#lowest_idObject



38
39
40
# File 'lib/backup/load_from_files.rb', line 38

def lowest_id
  ids.min
end