Class: XcodeArchiveCache::Config
- Inherits:
-
Object
- Object
- XcodeArchiveCache::Config
- 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
- #entry ⇒ Entry readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(&block) ⇒ Config
constructor
A new instance of Config.
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
Class Method Details
.from_file(path) ⇒ Object
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.}" end end config end |