Class: RakeTaskRunner
- Inherits:
-
Object
- Object
- RakeTaskRunner
- Defined in:
- lib/post_pusher/rake_task_runner.rb
Constant Summary collapse
- BUFSIZE =
160
Instance Attribute Summary collapse
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#task_name ⇒ Object
readonly
Returns the value of attribute task_name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(task_name) ⇒ RakeTaskRunner
constructor
A new instance of RakeTaskRunner.
- #work ⇒ Object
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
#status ⇒ Object (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_name ⇒ Object (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
#work ⇒ Object
16 17 18 |
# File 'lib/post_pusher/rake_task_runner.rb', line 16 def work @status = system(logging_rake_command) end |