Class: Renalware::UKRDC::Housekeeping::RemoveStaleFiles::OutgoingXmlFile
- Inherits:
-
Object
- Object
- Renalware::UKRDC::Housekeeping::RemoveStaleFiles::OutgoingXmlFile
- Defined in:
- app/models/renalware/ukrdc/housekeeping/remove_stale_files.rb
Instance Method Summary collapse
-
#batch_number ⇒ Object
Returns the integer batch number from the file name e.g.
Instance Method Details
#batch_number ⇒ Object
Returns the integer batch number from the file name e.g. 13 from /var/ukrdc/outgoing/RJZ_000040_1234606005.gpg
26 27 28 29 30 31 |
# File 'app/models/renalware/ukrdc/housekeeping/remove_stale_files.rb', line 26 def batch_number matches = filename.match(/\w*_(\d{6})_/) return unless matches matches[1].to_i end |