Class: BundleManager

Inherits:
Object
  • Object
show all
Defined in:
lib/sfb_scripts/bundler/bundle_manager.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(repo: raise, shell: raise, queue: raise, folder_guard: folder_guard) ⇒ BundleManager

Returns a new instance of BundleManager.



4
5
6
7
8
9
# File 'lib/sfb_scripts/bundler/bundle_manager.rb', line 4

def initialize(repo: raise, shell: raise, queue: raise, folder_guard: folder_guard)
  @shell = shell
  @repo = repo
  @queue = queue
  @folder_guard = folder_guard
end

Instance Attribute Details

#folder_guardObject

Returns the value of attribute folder_guard.



2
3
4
# File 'lib/sfb_scripts/bundler/bundle_manager.rb', line 2

def folder_guard
  @folder_guard
end

#queueObject

Returns the value of attribute queue.



2
3
4
# File 'lib/sfb_scripts/bundler/bundle_manager.rb', line 2

def queue
  @queue
end

#repoObject

Returns the value of attribute repo.



2
3
4
# File 'lib/sfb_scripts/bundler/bundle_manager.rb', line 2

def repo
  @repo
end

#shellObject

Returns the value of attribute shell.



2
3
4
# File 'lib/sfb_scripts/bundler/bundle_manager.rb', line 2

def shell
  @shell
end

Instance Method Details

#bundle_where_necessaryObject



11
12
13
14
15
16
17
18
19
# File 'lib/sfb_scripts/bundler/bundle_manager.rb', line 11

def bundle_where_necessary
  shell.notify "\nBundling:"
  directories_to_bundle.each do |dir|
    queue.enqueue_b do
      bundle(dir)
    end
  end
  queue.join
end