Module: ZergXcode

Extended by:
Paths
Defined in:
lib/zerg_xcode/paths.rb,
lib/zerg_xcode.rb,
lib/zerg_xcode/shortcuts.rb,
lib/zerg_xcode/file_format/lexer.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,
lib/zerg_xcode/file_format/scan_buffer.rb,
lib/zerg_xcode/file_format/id_generator.rb

Overview

:nodoc: namespace

Defined Under Namespace

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

Class Method Summary collapse

Methods included from Paths

project_file_at, project_root_at

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.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.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