class Lexicon::Common::Package::PackageFile

Constants

DATA
STRUCTURE

Attributes

path[R]

@return [Pathname]

type[R]

Public Class Methods

new(path, type:) click to toggle source
# File lib/lexicon/common/package/package_file.rb, line 42
def initialize(path, type:)
  @path = path
  @type = type
end
new_data(path) click to toggle source
# File lib/lexicon/common/package/package_file.rb, line 12
def new_data(path)
  new(path, type: DATA)
end
new_structure(path) click to toggle source
# File lib/lexicon/common/package/package_file.rb, line 8
def new_structure(path)
  new(path, type: STRUCTURE)
end

Public Instance Methods

data?() click to toggle source

@return [Boolean]

# File lib/lexicon/common/package/package_file.rb, line 26
def data?
  type == DATA
end
structure?() click to toggle source

@return [Boolean]

# File lib/lexicon/common/package/package_file.rb, line 31
def structure?
  type == STRUCTURE
end
to_s() click to toggle source

@return [String]

# File lib/lexicon/common/package/package_file.rb, line 21
def to_s
  path.to_s
end