Module: Marginalia::Comment
- Defined in:
- lib/marginalia/comment.rb
Class Method Summary collapse
- .clear! ⇒ Object
- .clear_job! ⇒ Object
- .construct_comment ⇒ Object
- .update!(controller = nil) ⇒ Object
- .update_adapter!(adapter) ⇒ Object
- .update_job!(job) ⇒ Object
Class Method Details
.clear! ⇒ Object
32 33 34 |
# File 'lib/marginalia/comment.rb', line 32 def self.clear! self.marginalia_controller = nil end |
.clear_job! ⇒ Object
36 37 38 |
# File 'lib/marginalia/comment.rb', line 36 def self.clear_job! self.marginalia_job = nil end |
.construct_comment ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/marginalia/comment.rb', line 20 def self.construct_comment ret = '' self.components.each do |c| component_value = self.send(c) if component_value.present? ret << "#{c.to_s}:#{component_value.to_s}," end end ret.chop! ret end |
.update!(controller = nil) ⇒ Object
8 9 10 |
# File 'lib/marginalia/comment.rb', line 8 def self.update!(controller = nil) self.marginalia_controller = controller end |
.update_adapter!(adapter) ⇒ Object
16 17 18 |
# File 'lib/marginalia/comment.rb', line 16 def self.update_adapter!(adapter) self.marginalia_adapter = adapter end |
.update_job!(job) ⇒ Object
12 13 14 |
# File 'lib/marginalia/comment.rb', line 12 def self.update_job!(job) self.marginalia_job = job end |