Class: Camunda::Model

Inherits:
Object
  • Object
show all
Includes:
Her::Model
Defined in:
lib/camunda/model.rb

Overview

This class in the main element of Her. It defines which API models will be bound to.

Defined Under Namespace

Classes: RecordNotFound

Class Method Summary collapse

Class Method Details

.find_by!(params) ⇒ Camunda::Model

Returns result of find_by but raises an exception instead of returning nil

Parameters:

  • params (Hash)

    query parameters

Returns:

Raises:



39
40
41
42
43
# File 'lib/camunda/model.rb', line 39

def self.find_by!(params)
  find_by(params).tap do |result|
    raise Camunda::Model::RecordNotFound unless result
  end
end

.log_details?Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/camunda/model.rb', line 6

def self.log_details?
  defined?(Rails) && Rails.env.development?
end

.worker_idString

Note:

default worker id is set in Camunda::Workflow.configuration

Returns the worker id

Returns:

  • (String)

    id of worker



48
49
50
# File 'lib/camunda/model.rb', line 48

def self.worker_id
  Camunda::Workflow.configuration.worker_id
end