Sha256: 527070936d5e7f78b212e5f99e8a388414428e2627f15e6d014f03f50fdacd24

Contents?: true

Size: 513 Bytes

Versions: 9

Compression:

Stored size: 513 Bytes

Contents

module Xcode
  class Target
    attr_reader :configs, :project
    
    def initialize(project, json)
      @project = project
      @json = json
      @configs = {}
    end
    
    def productName
      @json['productName']
    end
    
    def name
      @json['name']
    end
    
    def config(name)
      config = @configs[name.to_s.to_sym]
      raise "No such config #{name}, available configs are #{@configs.keys}" if config.nil?
      yield config if block_given?
      config
    end
    
  end
  
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
xcoder-0.0.9 lib/xcode/target.rb
xcoder-0.0.8 lib/xcode/target.rb
xcoder-0.0.7 lib/xcode/target.rb
xcoder-0.0.6 lib/xcode/target.rb
xcoder-0.0.5 lib/xcode/target.rb
xcoder-0.0.4 lib/xcode/target.rb
xcoder-0.0.3 lib/xcode/target.rb
xcoder-0.0.2 lib/xcode/target.rb
xcoder-0.0.1 lib/xcode/target.rb