Module: Logidze::Meta
- Included in:
- Logidze
- Defined in:
- lib/logidze/meta.rb
Overview
Provide methods to attach meta information
Instance Method Summary collapse
- #with_meta(meta, transactional: true, &block) ⇒ Object
- #with_responsible(responsible_id, transactional: true, &block) ⇒ Object
Instance Method Details
#with_meta(meta, transactional: true, &block) ⇒ Object
6 7 8 9 |
# File 'lib/logidze/meta.rb', line 6 def (, transactional: true, &block) wrapper = transactional ? MetaWithTransaction : MetaWithoutTransaction wrapper.wrap_with(, &block) end |
#with_responsible(responsible_id, transactional: true, &block) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/logidze/meta.rb', line 11 def with_responsible(responsible_id, transactional: true, &block) return yield if responsible_id.nil? = {Logidze::History::Version::META_RESPONSIBLE => responsible_id} (, transactional: transactional, &block) end |