class Shellac::ConfigClass::Task
Attributes
order[RW]
task[RW]
Public Class Methods
new(order = 0, &task)
click to toggle source
# File lib/shellac/config/task.rb, line 8 def initialize(order = 0, &task) @order = order @task = task end
Public Instance Methods
<=>(another_task)
click to toggle source
# File lib/shellac/config/task.rb, line 13 def <=>(another_task) if @order < another_task.order -1 elsif @order > another_task.order 1 else if @task.to_s < another_task.task.to_s -1 elsif @task.to_s > another_task.task.to_s 1 else 0 end end end
call(*args)
click to toggle source
# File lib/shellac/config/task.rb, line 29 def call(*args) @task.call(*args) if @task end