>SpecsState

SpecsState

This class represents the state of a collection of Pods.

Inherits from:

Object

Analysis sub-steps

initialize

added

changed

deleted

unchanged

print

add_name

initialize

Signature

initialize(pods_by_state = nil) #=> SpecsState 

Parameters

Hash{Symbol=>String} pods_by_state

The root name of the pods grouped by their state (:added, :removed, :changed or :unchanged).

Returns

SpecsState A new instance of SpecsState

Source

509 def initialize(pods_by_state = nil)
510   @added     = []
511   @deleted   = []
512   @changed   = []
513   @unchanged = []
514 
515   if pods_by_state
516     @added     = pods_by_state[:added]     || []
517     @deleted   = pods_by_state[:removed]   || []
518     @changed   = pods_by_state[:changed]   || []
519     @unchanged = pods_by_state[:unchanged] || []
520   end
521 end

Source Files

lib/cocoapods/installer/analyzer.rb:509

spec/unit/installer/analyzer_spec.rb

addedreadwrite attribute

Signature

added #=> Array<String> 

Returns

Array The names of the pods that were added.

Signature

added=(value) #=> Array<String> 

Returns

Array The names of the pods that were added.

Source Files

lib/cocoapods/installer/analyzer.rb:525

spec/unit/installer/analyzer_spec.rb

changedreadwrite attribute

Signature

changed #=> Array<String> 

Returns

Array The names of the pods that were changed.

Signature

changed=(value) #=> Array<String> 

Returns

Array The names of the pods that were changed.

Source Files

lib/cocoapods/installer/analyzer.rb:529

spec/unit/installer/analyzer_spec.rb

deletedreadwrite attribute

Signature

deleted #=> Array<String> 

Returns

Array The names of the pods that were deleted.

Signature

deleted=(value) #=> Array<String> 

Returns

Array The names of the pods that were deleted.

Source Files

lib/cocoapods/installer/analyzer.rb:533

spec/unit/installer/analyzer_spec.rb

unchangedreadwrite attribute

Signature

unchanged #=> Array<String> 

Returns

Array The names of the pods that were unchanged.

Signature

unchanged=(value) #=> Array<String> 

Returns

Array The names of the pods that were unchanged.

Source Files

lib/cocoapods/installer/analyzer.rb:537

spec/unit/installer/analyzer_spec.rb

print

Signature

print #=> void 

Returns

void

Source

543 def print
544   added    .sort.each { |pod| UI.message("A".green  + " #{pod}", '', 2) }
545   deleted  .sort.each { |pod| UI.message("R".red    + " #{pod}", '', 2) }
546   changed  .sort.each { |pod| UI.message("M".yellow + " #{pod}", '', 2) }
547   unchanged.sort.each { |pod| UI.message("-"        + " #{pod}", '', 2) }
548 end

Source Files

lib/cocoapods/installer/analyzer.rb:543

spec/unit/installer/analyzer_spec.rb

add_name

Signature

add_name(name, state) #=> void 

Parameters

String the

Name of the Pod.

Symbol the

State of the Pod.

Returns

void

Source

562 def add_name(name, state)
563   raise "[Bug] Attempt to add subspec to the pods state" if name.include?('/')
564   self.send(state) << name
565 end

Source Files

lib/cocoapods/installer/analyzer.rb:562

spec/unit/installer/analyzer_spec.rb