Class: Lev::NullStatus
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(id = nil) ⇒ NullStatus
Returns a new instance of NullStatus.
4
5
6
7
|
# File 'lib/lev/null_status.rb', line 4
def initialize(id=nil)
@id = id || "null-status:#{SecureRandom.uuid}"
@kill_requested = false
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*args, **kwargs, &block) ⇒ Object
17
18
19
|
# File 'lib/lev/null_status.rb', line 17
def method_missing(*args, **kwargs, &block)
nil
end
|
Instance Attribute Details
Returns the value of attribute id.
2
3
4
|
# File 'lib/lev/null_status.rb', line 2
def id
@id
end
|
Instance Method Details
#add_error ⇒ Object
30
|
# File 'lib/lev/null_status.rb', line 30
def add_error(*); end
|
35
|
# File 'lib/lev/null_status.rb', line 35
def failed!; end
|
#kill_requested? ⇒ Boolean
13
14
15
|
# File 'lib/lev/null_status.rb', line 13
def kill_requested?
@kill_requested
end
|
36
|
# File 'lib/lev/null_status.rb', line 36
def killed!; end
|
32
|
# File 'lib/lev/null_status.rb', line 32
def queued!; end
|
#request_kill! ⇒ Object
9
10
11
|
# File 'lib/lev/null_status.rb', line 9
def request_kill!
@kill_requested = true
end
|
29
|
# File 'lib/lev/null_status.rb', line 29
def save(*); end
|
#set_job_args ⇒ Object
26
|
# File 'lib/lev/null_status.rb', line 26
def set_job_args(*); end
|
#set_job_name ⇒ Object
Provide null object pattern methods for status setter methods called from within routines; routines should not be using other query methods to check their own status (they should know it), with the exception of ‘kill_requested?`
25
|
# File 'lib/lev/null_status.rb', line 25
def set_job_name(*); end
|
#set_progress ⇒ Object
28
|
# File 'lib/lev/null_status.rb', line 28
def set_progress(*); end
|
#set_provider_job_id ⇒ Object
27
|
# File 'lib/lev/null_status.rb', line 27
def set_provider_job_id(*); end
|
33
|
# File 'lib/lev/null_status.rb', line 33
def started!; end
|
#succeeded! ⇒ Object
34
|
# File 'lib/lev/null_status.rb', line 34
def succeeded!; end
|