Class: Txtar::File

Inherits:
Object
  • Object
show all
Defined in:
lib/txtar/file.rb

Overview

A File is a single file in an archive.

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#dataObject (readonly)

Returns the value of attribute data.



6
7
8
# File 'lib/txtar/file.rb', line 6

def data
  @data
end

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/txtar/file.rb', line 6

def name
  @name
end