Class: Agent::Lock::Manager::Result

Inherits:
Data
  • Object
show all
Defined in:
lib/agent/lock/manager.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#message ⇒ Object (readonly)

Returns the value of attribute message

Returns:

  • (Object) —

    the current value of message



19
20
21
# File 'lib/agent/lock/manager.rb', line 19

def message
  @message
end

#records ⇒ Object (readonly)

Returns the value of attribute records

Returns:

  • (Object) —

    the current value of records



19
20
21
# File 'lib/agent/lock/manager.rb', line 19

def records
  @records
end

#status ⇒ Object (readonly)

Returns the value of attribute status

Returns:

  • (Object) —

    the current value of status



19
20
21
# File 'lib/agent/lock/manager.rb', line 19

def status
  @status
end

Instance Method Details

#code ⇒ Integer

Returns what the process should exit with.

Returns:

  • (Integer) —

    what the process should exit with



21
# File 'lib/agent/lock/manager.rb', line 21

def code = i[held refused not_found interrupted parent_scope].include?(status) ? 1 : 0

#record ⇒ Record?

Returns the one record most results are about.

Returns:

  • (Record, nil) —

    the one record most results are about



24
# File 'lib/agent/lock/manager.rb', line 24

def record = records.first