Class: Txtar::File
- Inherits:
-
Object
- Object
- Txtar::File
- Defined in:
- lib/txtar/file.rb
Overview
A File is a single file in an archive.
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name:, data: nil) ⇒ File
constructor
A new instance of File.
Constructor Details
#initialize(name:, data: nil) ⇒ File
Returns a new instance of File.
9 10 11 12 |
# File 'lib/txtar/file.rb', line 9 def initialize(name:, data: nil) @name = name @data = data end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
6 7 8 |
# File 'lib/txtar/file.rb', line 6 def data @data end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/txtar/file.rb', line 6 def name @name end |