Class: SnapCi::ProjectList
- Inherits:
-
Object
- Object
- SnapCi::ProjectList
- Defined in:
- lib/snap_ci/project_list.rb
Instance Attribute Summary collapse
-
#list ⇒ Object
readonly
Returns the value of attribute list.
Instance Method Summary collapse
-
#initialize(args) ⇒ ProjectList
constructor
A new instance of ProjectList.
- #to_message ⇒ Object
Constructor Details
#initialize(args) ⇒ ProjectList
Returns a new instance of ProjectList.
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/snap_ci/project_list.rb', line 7 def initialize(args) @list = [] mutex = Mutex.new args.projects.map do |project_info| Thread.new do = Project.new(project_info, args). mutex.synchronize { @list << } end end.each(&:join) end |
Instance Attribute Details
#list ⇒ Object (readonly)
Returns the value of attribute list.
5 6 7 |
# File 'lib/snap_ci/project_list.rb', line 5 def list @list end |
Instance Method Details
#to_message ⇒ Object
19 20 21 |
# File 'lib/snap_ci/project_list.rb', line 19 def list.join("\n\n") end |