class XcodeArchiveCache::Config

Attributes

entry[RW]

@return [Entry]

Public Class Methods

from_file(path) click to toggle source

@param [String] path

# File lib/config/config.rb, line 168
def self.from_file(path)
  contents = File.open(path, "r:utf-8", &:read)

  config = Config.new do
    begin
      eval(contents, nil, path)
    rescue Exception => e
      raise XcodeArchiveCache::Informative, "Invalid #{File.basename(path)} file: #{e.message}"
    end
  end

  config
end
new(&block) click to toggle source
# File lib/config/config.rb, line 186
def initialize(&block)
  @entry = nil
  @current_target = nil

  if block
    instance_eval(&block)
  end
end

Private Instance Methods

current_configuration() click to toggle source

@return [Configuration]

# File lib/config/config.rb, line 201
def current_configuration
  entry.configurations.last
end
current_target() click to toggle source

@return [Target]

# File lib/config/config.rb, line 207
def current_target
  entry.targets.last
end