Class: Evertils::Controller::Log
- 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
Instance Method Summary collapse
- #grep(text = nil) ⇒ Object
- #group(text = nil) ⇒ Object
-
#message(text = nil) ⇒ Object
Send arbitrary text to the daily log.
- #pre_exec ⇒ Object
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
#grep(text = nil) ⇒ Object
25 26 27 28 29 30 31 32 33 |
# File 'lib/evertils/controllers/log.rb', line 25 def grep(text = nil) return Notify.error('A search term is required') if text.nil? @note = @note_helper.find_note_by_grammar(grammar.to_s) return Notify.error('Note not found') if @note.entity.nil? search_for(text) end |
#group(text = nil) ⇒ Object
37 38 39 40 41 42 43 |
# File 'lib/evertils/controllers/log.rb', line 37 def group(text = nil) @note = @note_helper.find_note_by_grammar(grammar.to_s) return Notify.error('Note not found') if @note.entity.nil? group_by(text) end |
#message(text = nil) ⇒ Object
Send arbitrary text to the daily log
13 14 15 16 17 18 19 20 21 |
# File 'lib/evertils/controllers/log.rb', line 13 def (text = nil) return Notify.error('A message is required') if text.nil? @note = @note_helper.find_note_by_grammar(grammar.to_s) return Notify.error('Note not found') if @note.entity.nil? modify_with(text) end |