Class: Capsium::Package::MergedView::Layer

Inherits:
Data
  • Object
show all
Defined in:
lib/capsium/package/merged_view.rb,
sig/capsium/package/merged_view.rbs

Overview

A single read layer: an absolute root directory mirroring the content/ tree, plus its parsed tombstone set.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#rootObject (readonly)

Returns the value of attribute root

Returns:

  • (Object)

    the current value of root



32
33
34
# File 'lib/capsium/package/merged_view.rb', line 32

def root
  @root
end

#tombstonesObject (readonly)

Returns the value of attribute tombstones

Returns:

  • (Object)

    the current value of tombstones



32
33
34
# File 'lib/capsium/package/merged_view.rb', line 32

def tombstones
  @tombstones
end

#visibilityObject (readonly)

Returns the value of attribute visibility

Returns:

  • (Object)

    the current value of visibility



32
33
34
# File 'lib/capsium/package/merged_view.rb', line 32

def visibility
  @visibility
end

Class Method Details

.newvoid

This method returns an undefined value.

Parameters:

  • root (String)
  • visibility (String)
  • tombstones (Set[String])


9
# File 'sig/capsium/package/merged_view.rbs', line 9

def self.new: (String root, String visibility, Set[String] tombstones) -> void

Instance Method Details

#absolute(content_relative_path) ⇒ String

Parameters:

  • content_relative_path (String)

Returns:

  • (String)


37
38
39
# File 'lib/capsium/package/merged_view.rb', line 37

def absolute(content_relative_path)
  File.join(root, content_relative_path)
end

#file?(content_relative_path) ⇒ Boolean

Parameters:

  • content_relative_path (String)

Returns:

  • (Boolean)


33
34
35
# File 'lib/capsium/package/merged_view.rb', line 33

def file?(content_relative_path)
  File.file?(absolute(content_relative_path))
end