Class: XcodeArchiveCache::Config

Inherits:
Object
  • Object
show all
Includes:
DSL
Defined in:
lib/config/dsl.rb,
lib/config/config.rb

Defined Under Namespace

Modules: DSL Classes: Configuration, Entry, Project, Settings, Storage, Target, Workspace

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from DSL

#action, #build_configuration, #cache, #cache_itself, #configuration, #derived_data_path, #project, #target, #workspace, #xcodebuild_args

Constructor Details

#initialize(&block) ⇒ Config

Returns a new instance of Config.



186
187
188
189
190
191
192
193
# File 'lib/config/config.rb', line 186

def initialize(&block)
  @entry = nil
  @current_target = nil

  if block
    instance_eval(&block)
  end
end

Instance Attribute Details

#entryEntry

Returns:



184
185
186
# File 'lib/config/config.rb', line 184

def entry
  @entry
end

Class Method Details

.from_file(path) ⇒ Object

Parameters:

  • path (String)


168
169
170
171
172
173
174
175
176
177
178
179
180
# 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