Module: ZergXcode

Defined in:
lib/zerg_xcode/shortcuts.rb,
lib/zerg_xcode/file_format/lexer.rb,
lib/zerg_xcode/file_format/paths.rb,
lib/zerg_xcode/plugins/core/core.rb,
lib/zerg_xcode/file_format/parser.rb,
lib/zerg_xcode/file_format/encoder.rb,
lib/zerg_xcode/file_format/archiver.rb,
lib/zerg_xcode/objects/xcode_object.rb

Overview

:nodoc: namespace

Defined Under Namespace

Modules: Archiver, Builder, Encoder, Lexer, Objects, Parser, Paths, Plugins Classes: XcodeObject

Class Method Summary collapse

Class Method Details

.dump(project, path) ⇒ Object

Dumps an Xcode project to the filesystem.



20
21
22
23
24
# File 'lib/zerg_xcode/shortcuts.rb', line 20

def self.dump(project, path)
  file = ZergXcode::Paths.project_file_at path
  pbx_contents = Archiver.archive project
  File.open(file, 'w') { |f| f.write pbx_contents }
end

.load(path) ⇒ Object

Reads an Xcode project from the filesystem.



11
12
13
14
15
16
17
# File 'lib/zerg_xcode/shortcuts.rb', line 11

def self.load(path)
  file = ZergXcode::Paths.project_file_at path
  pbx_contents = File.read file
  project = Archiver.unarchive pbx_contents
  project.source_filename = file
  return project
end

.plugin(plugin_name) ⇒ Object

Instantiate a plug-in.



27
28
29
# File 'lib/zerg_xcode/shortcuts.rb', line 27

def self.plugin(plugin_name)
  ZergXcode::Plugins.get(plugin_name)
end