Class: RakeTaskRunner

Inherits:
Object
  • Object
show all
Defined in:
lib/post_pusher/rake_task_runner.rb

Constant Summary collapse

BUFSIZE =
160

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(task_name) ⇒ RakeTaskRunner

Returns a new instance of RakeTaskRunner.



12
13
14
# File 'lib/post_pusher/rake_task_runner.rb', line 12

def initialize(task_name)
  @task_name = task_name
end

Instance Attribute Details

#statusObject (readonly)

Returns the value of attribute status.



10
11
12
# File 'lib/post_pusher/rake_task_runner.rb', line 10

def status
  @status
end

#task_nameObject (readonly)

Returns the value of attribute task_name.



10
11
12
# File 'lib/post_pusher/rake_task_runner.rb', line 10

def task_name
  @task_name
end

Class Method Details

.exec(task) ⇒ Object



6
7
8
# File 'lib/post_pusher/rake_task_runner.rb', line 6

def self.exec(task)
  RakeTaskRunner.new(task).tap(&:work)
end

Instance Method Details

#workObject



16
17
18
# File 'lib/post_pusher/rake_task_runner.rb', line 16

def work
  @status = system(logging_rake_command)
end