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


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

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

Instance Attribute Details

#allHash{String => String} (readonly)

Returns:

  • (Hash{String => String})


11
12
13
# File 'lib/build_settings/loader.rb', line 11

def all
  @all
end

#filteredHash{String => String} (readonly)

Returns:

  • (Hash{String => String})


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

def filtered
  @filtered
end

Instance Method Details

#==(other) ⇒ Object



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

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

#[](name) ⇒ Object



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

def [](name)
  all[name]
end

#filtered_to_stringString

Returns:

  • (String)


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

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