Class: Remi::Extractor::FileSystemEntry

Inherits:
Object
  • Object
show all
Defined in:
lib/remi/extractor/file_system.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(pathname:, create_time:, modified_time:, raw: nil) ⇒ FileSystemEntry

Returns a new instance of FileSystemEntry.



5
6
7
8
9
10
# File 'lib/remi/extractor/file_system.rb', line 5

def initialize(pathname:, create_time:, modified_time:, raw: nil)
  @pathname = Pathname.new(pathname)
  @create_time = create_time
  @modified_time = modified_time
  @raw = raw
end

Instance Attribute Details

#create_timeObject (readonly)

Returns the value of attribute create_time.



12
13
14
# File 'lib/remi/extractor/file_system.rb', line 12

def create_time
  @create_time
end

#modified_timeObject (readonly)

Returns the value of attribute modified_time.



12
13
14
# File 'lib/remi/extractor/file_system.rb', line 12

def modified_time
  @modified_time
end

#pathnameObject (readonly)

Returns the value of attribute pathname.



12
13
14
# File 'lib/remi/extractor/file_system.rb', line 12

def pathname
  @pathname
end

#rawObject (readonly)

Returns the value of attribute raw.



12
13
14
# File 'lib/remi/extractor/file_system.rb', line 12

def raw
  @raw
end

Instance Method Details

#nameObject



14
15
16
# File 'lib/remi/extractor/file_system.rb', line 14

def name
  @pathname.basename.to_s
end