class Revamp::Parser::PuppetTarball::Entry

An entry from tarball

Attributes

content[RW]
name[RW]

Public Class Methods

new(tarfile) click to toggle source
# File lib/revamp/parser/puppet-tarball.rb, line 63
def initialize(tarfile)
  @tarfile = tarfile
  @name    = tarfile.full_name
  @content = nil
  @content = tarfile.read unless @tarfile.directory?
end

Public Instance Methods

file?() click to toggle source
# File lib/revamp/parser/puppet-tarball.rb, line 74
def file?
  !content.nil?
end
metadata?() click to toggle source
# File lib/revamp/parser/puppet-tarball.rb, line 70
def metadata?
  !@tarfile.directory? && name.end_with?('metadata.json')
end