Class: XcodeIDE::PBX
- Inherits:
-
Object
- Object
- XcodeIDE::PBX
- Defined in:
- lib/xcodeide/project.rb
Class Method Summary collapse
Instance Method Summary collapse
- #configurations ⇒ Object
-
#initialize ⇒ PBX
constructor
A new instance of PBX.
- #parse(io) ⇒ Object
Constructor Details
#initialize ⇒ PBX
Returns a new instance of PBX.
42 43 44 |
# File 'lib/xcodeide/project.rb', line 42 def initialize @root = nil end |
Class Method Details
.load(io) ⇒ Object
31 32 33 34 35 36 37 38 39 40 |
# File 'lib/xcodeide/project.rb', line 31 def self.load(io) ios = IOScanner.new(io) token = ios.tokenize raise "Unable to deserialize root object." if token != ?{ pbx = PBX.new pbx.parse(io) pbx end |
Instance Method Details
#configurations ⇒ Object
46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/xcodeide/project.rb', line 46 def configurations configs = [] objects = @root['objects'] objects.each do |key, value| if value.is_a == 'PBXBuildStyle' || value.is_a == 'XCBuildConfiguration' configs << value['name'] end end return configs.uniq end |
#parse(io) ⇒ Object
59 60 61 |
# File 'lib/xcodeide/project.rb', line 59 def parse(io) @root = ObjectNode.new(io) end |