Class: Flatware::Job

Inherits:
Struct
  • Object
show all
Defined in:
lib/flatware/job.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#argsObject

Returns the value of attribute args

Returns:

  • (Object)

    the current value of args



2
3
4
# File 'lib/flatware/job.rb', line 2

def args
  @args
end

#failed=(value) ⇒ Object (writeonly)

Sets the attribute failed

Parameters:

  • value

    the value to set the attribute failed to.



4
5
6
# File 'lib/flatware/job.rb', line 4

def failed=(value)
  @failed = value
end

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



2
3
4
# File 'lib/flatware/job.rb', line 2

def id
  @id
end

#workerObject

Returns the value of attribute worker.



3
4
5
# File 'lib/flatware/job.rb', line 3

def worker
  @worker
end

Class Method Details

.sentinelObject



18
19
20
# File 'lib/flatware/job.rb', line 18

def self.sentinel
  new 'seppuku'
end

Instance Method Details

#failed!Object



10
11
12
# File 'lib/flatware/job.rb', line 10

def failed!
  @failed = true
end

#failed?Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/flatware/job.rb', line 6

def failed?
  @failed == true
end

#sentinel?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/flatware/job.rb', line 14

def sentinel?
  id == 'seppuku'
end