class Kleiber::Performer

Provides api for symphony perphomance @author Кирилл Бобыкин <qelphybox@gmail.com>

Attributes

projects[R]
symphony[R]

Public Class Methods

new(symphony, projects, options) click to toggle source
# File lib/kleiber/performer.rb, line 8
def initialize(symphony, projects, options)
  @symphony = symphony
  @projects = projects
  @tasks    = options[:tasks]
end

Public Instance Methods

task_names() click to toggle source

Returns array of task names @return [Array] task names

# File lib/kleiber/performer.rb, line 27
def task_names
  @tasks ? @tasks.split(':') : []
end
tasks() click to toggle source

Returns tasks to run with command @return [Hash] tasks to run

# File lib/kleiber/performer.rb, line 33
def tasks
  all_tasks = Kleiber.settings.tasks
  task_names.each_with_object({}) { |t, hash| hash[t] = all_tasks[t] if all_tasks.key?(t) }
end