This class represents the state of a collection of Pods.
Object
initialize
added
changed
deleted
unchanged
add_name
initialize(pods_by_state = nil) #=> SpecsState
Hash{Symbol=>String}
pods_by_state
The root name of the pods grouped by their state
(:added
, :removed
, :changed
or :unchanged
).
SpecsState
A new instance of SpecsState
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
added #=> Array<String>
Array
The names of the pods that were added.
added=(value) #=> Array<String>
Array
The names of the pods that were added.
changed #=> Array<String>
Array
The names of the pods that were changed.
changed=(value) #=> Array<String>
Array
The names of the pods that were changed.
deleted #=> Array<String>
Array
The names of the pods that were deleted.
deleted=(value) #=> Array<String>
Array
The names of the pods that were deleted.
unchanged #=> Array<String>
Array
The names of the pods that were unchanged.
unchanged=(value) #=> Array<String>
Array
The names of the pods that were unchanged.
print #=> void
void
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
add_name(name, state) #=> void
String
the
Name of the Pod.
Symbol
the
State of the Pod.
void
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