Class: XcodeResultBundleProcessor::DirectoryResultsBundle

Inherits:
Object
  • Object
show all
Defined in:
lib/xcoderesultbundleprocessor/results_bundle.rb

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ DirectoryResultsBundle

Returns a new instance of DirectoryResultsBundle.



3
4
5
# File 'lib/xcoderesultbundleprocessor/results_bundle.rb', line 3

def initialize(path)
  @path = Pathname.new(path)
end

Instance Method Details

#copy_file(source, destination) ⇒ Object



15
16
17
# File 'lib/xcoderesultbundleprocessor/results_bundle.rb', line 15

def copy_file(source, destination)
  FileUtils.copy(@path.join(source), destination)
end

#open_file(path, &block) ⇒ Object



11
12
13
# File 'lib/xcoderesultbundleprocessor/results_bundle.rb', line 11

def open_file(path, &block)
  File.open(@path.join(path), &block)
end

#read_plist(path) ⇒ Object



7
8
9
# File 'lib/xcoderesultbundleprocessor/results_bundle.rb', line 7

def read_plist(path)
  CFPropertyList.native_types(CFPropertyList::List.new(file: @path.join(path)).value)
end