Class: Decidim::SpamSignal::ApplicationHandler

Inherits:
Command
  • Object
show all
Defined in:
app/commands/decidim/spam_signal/application_handler.rb

Direct Known Subclasses

Cops::CopHandler, Scans::ScanHandler

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.formObject

Raises:



6
7
8
# File 'app/commands/decidim/spam_signal/application_handler.rb', line 6

def self.form
  raise Error, "Handler need to define a form or return null"
end

.handler_nameObject



10
11
12
# File 'app/commands/decidim/spam_signal/application_handler.rb', line 10

def self.handler_name
  name.demodulize.underscore.sub(/(_cop|_scan)(_form|_command)/, "")
end

.i18n_keyObject

Raises:



18
19
20
# File 'app/commands/decidim/spam_signal/application_handler.rb', line 18

def self.i18n_key
  raise Error, "Not Implemented"
end

Instance Method Details

#configObject

Raises:



22
23
24
# File 'app/commands/decidim/spam_signal/application_handler.rb', line 22

def config
  raise Error, "Not Implemented"
end

#handler_nameObject



14
15
16
# File 'app/commands/decidim/spam_signal/application_handler.rb', line 14

def handler_name
  self.class.handler_name
end