Class: Packages::Debian::FileEntry
- Inherits:
-
Object
- Object
- Packages::Debian::FileEntry
- Includes:
- ActiveModel::Model
- Defined in:
- app/models/packages/debian/file_entry.rb
Constant Summary collapse
- DIGESTS =
%i[md5 sha1 sha256].freeze
- FILENAME_REGEX =
%r{\A[a-zA-Z0-9][a-zA-Z0-9_.~+-]*\z}
Instance Attribute Summary collapse
-
#filename ⇒ Object
Returns the value of attribute filename.
-
#md5sum ⇒ Object
Returns the value of attribute md5sum.
-
#package_file ⇒ Object
Returns the value of attribute package_file.
-
#priority ⇒ Object
Returns the value of attribute priority.
-
#section ⇒ Object
Returns the value of attribute section.
-
#sha1sum ⇒ Object
Returns the value of attribute sha1sum.
-
#sha256sum ⇒ Object
Returns the value of attribute sha256sum.
-
#size ⇒ Object
Returns the value of attribute size.
Instance Method Summary collapse
Instance Attribute Details
#filename ⇒ Object
Returns the value of attribute filename.
11 12 13 |
# File 'app/models/packages/debian/file_entry.rb', line 11 def filename @filename end |
#md5sum ⇒ Object
Returns the value of attribute md5sum.
11 12 13 |
# File 'app/models/packages/debian/file_entry.rb', line 11 def md5sum @md5sum end |
#package_file ⇒ Object
Returns the value of attribute package_file.
11 12 13 |
# File 'app/models/packages/debian/file_entry.rb', line 11 def package_file @package_file end |
#priority ⇒ Object
Returns the value of attribute priority.
11 12 13 |
# File 'app/models/packages/debian/file_entry.rb', line 11 def priority @priority end |
#section ⇒ Object
Returns the value of attribute section.
11 12 13 |
# File 'app/models/packages/debian/file_entry.rb', line 11 def section @section end |
#sha1sum ⇒ Object
Returns the value of attribute sha1sum.
11 12 13 |
# File 'app/models/packages/debian/file_entry.rb', line 11 def sha1sum @sha1sum end |
#sha256sum ⇒ Object
Returns the value of attribute sha256sum.
11 12 13 |
# File 'app/models/packages/debian/file_entry.rb', line 11 def sha256sum @sha256sum end |
#size ⇒ Object
Returns the value of attribute size.
11 12 13 |
# File 'app/models/packages/debian/file_entry.rb', line 11 def size @size end |
Instance Method Details
#component ⇒ Object
24 25 26 27 28 29 |
# File 'app/models/packages/debian/file_entry.rb', line 24 def component return 'main' if section.blank? return 'main' unless section.include?('/') section.split('/')[0] end |