Class: Evertils::Controller::Log

Inherits:
Base
  • Object
show all
Defined in:
lib/evertils/controllers/log.rb

Constant Summary

Constants inherited from Base

Base::OK, Base::QUIT, Base::QUIT_SOFT

Instance Attribute Summary

Attributes inherited from Base

#config, #request

Instance Method Summary collapse

Methods inherited from Base

#can_exec?, #exec, #initialize, #post_exec, #sample

Constructor Details

This class inherits a constructor from Evertils::Controller::Base

Instance Method Details

#message(text) ⇒ Object

Send arbitrary text to the daily log



12
13
14
15
16
17
18
19
20
21
22
# File 'lib/evertils/controllers/log.rb', line 12

def message(text)
  Notify.error('Text argument is required', {}) if text.nil?

  note = @note_helper.wait_for(:Daily)
  edit_conf = {
    search: 'Triage',
    append: text
  }

  modify(note, edit_conf)
end

#pre_execObject



4
5
6
7
8
9
# File 'lib/evertils/controllers/log.rb', line 4

def pre_exec
  super

  @note_helper = Evertils::Helper.load('Note')
  @api_helper = Evertils::Helper.load('ApiEnmlHandler', {})
end