Class: XcodeArchiveCache::BuildSettings::Container

Inherits:
Object
  • Object
show all
Defined in:
lib/build_settings/loader.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(all, filtered) ⇒ Container

Returns a new instance of Container.

Parameters:

  • all (Hash{String => String})
  • filtered (Hash{String => String})


27
28
29
30
# File 'lib/build_settings/loader.rb', line 27

def initialize(all, filtered)
  @all = all
  @filtered = filtered
end

Instance Attribute Details

#allHash{String => String} (readonly)

Returns:

  • (Hash{String => String})


18
19
20
# File 'lib/build_settings/loader.rb', line 18

def all
  @all
end

#filteredHash{String => String} (readonly)

Returns:

  • (Hash{String => String})


22
23
24
# File 'lib/build_settings/loader.rb', line 22

def filtered
  @filtered
end

Instance Method Details

#==(other) ⇒ Object



36
37
38
# File 'lib/build_settings/loader.rb', line 36

def ==(other)
  other && other.all == all && other.filtered == filtered
end

#[](name) ⇒ Object



32
33
34
# File 'lib/build_settings/loader.rb', line 32

def [](name)
  all[name]
end

#filtered_to_stringString

Returns:

  • (String)


42
43
44
# File 'lib/build_settings/loader.rb', line 42

def filtered_to_string
  filtered.map {|name, value| "#{name} = #{value}"}.join("\n")
end