Class: Decidim::Voca::CommandJob

Inherits:
ApplicationJob
  • Object
show all
Defined in:
app/jobs/decidim/voca/command_job.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#command_nameObject (readonly)

Returns the value of attribute command_name.



7
8
9
# File 'app/jobs/decidim/voca/command_job.rb', line 7

def command_name
  @command_name
end

#loggerObject (readonly)

Returns the value of attribute logger.



7
8
9
# File 'app/jobs/decidim/voca/command_job.rb', line 7

def logger
  @logger
end

#variablesObject (readonly)

Returns the value of attribute variables.



7
8
9
# File 'app/jobs/decidim/voca/command_job.rb', line 7

def variables
  @variables
end

Instance Method Details

#perform(command_name, variables = {}, logger = Rails.logger) ⇒ Object



8
9
10
11
12
13
# File 'app/jobs/decidim/voca/command_job.rb', line 8

def perform(command_name, variables = {}, logger = Rails.logger)
  @command_name = command_name
  @variables = variables
  @logger = logger
  invoke!
end