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})


25
26
27
28
# File 'lib/build_settings/loader.rb', line 25

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

Instance Attribute Details

#allHash{String => String} (readonly)

Returns:

  • (Hash{String => String})


16
17
18
# File 'lib/build_settings/loader.rb', line 16

def all
  @all
end

#filteredHash{String => String} (readonly)

Returns:

  • (Hash{String => String})


20
21
22
# File 'lib/build_settings/loader.rb', line 20

def filtered
  @filtered
end

Instance Method Details

#==(other) ⇒ Object



34
35
36
# File 'lib/build_settings/loader.rb', line 34

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

#[](name) ⇒ Object



30
31
32
# File 'lib/build_settings/loader.rb', line 30

def [](name)
  all[name]
end

#filtered_to_stringString

Returns:

  • (String)


40
41
42
# File 'lib/build_settings/loader.rb', line 40

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