Class: Metacrunch::File::Entry
- Inherits:
-
Object
- Object
- Metacrunch::File::Entry
- Defined in:
- lib/metacrunch/file/entry.rb
Instance Attribute Summary collapse
-
#archive_filename ⇒ Object
readonly
Returns the value of attribute archive_filename.
-
#contents ⇒ Object
readonly
Returns the value of attribute contents.
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
Instance Method Summary collapse
- #from_archive? ⇒ Boolean
-
#initialize(filename:, archive_filename: nil, contents: nil) ⇒ Entry
constructor
A new instance of Entry.
Constructor Details
#initialize(filename:, archive_filename: nil, contents: nil) ⇒ Entry
Returns a new instance of Entry.
8 9 10 11 12 |
# File 'lib/metacrunch/file/entry.rb', line 8 def initialize(filename:, archive_filename: nil, contents: nil) @filename = filename @archive_filename = archive_filename.presence @contents = contents end |
Instance Attribute Details
#archive_filename ⇒ Object (readonly)
Returns the value of attribute archive_filename.
6 7 8 |
# File 'lib/metacrunch/file/entry.rb', line 6 def archive_filename @archive_filename end |
#contents ⇒ Object (readonly)
Returns the value of attribute contents.
6 7 8 |
# File 'lib/metacrunch/file/entry.rb', line 6 def contents @contents end |
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
6 7 8 |
# File 'lib/metacrunch/file/entry.rb', line 6 def filename @filename end |
Instance Method Details
#from_archive? ⇒ Boolean
14 15 16 |
# File 'lib/metacrunch/file/entry.rb', line 14 def from_archive? @archive_filename != nil end |