Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/sup_tag/extensions/Object.rb
Overview
Modify Object to support tag and archive methods.
Instance Method Summary collapse
-
#archive(&block) ⇒ Set
Archive messages using the given block.
-
#get_tagger(&block) ⇒ SupTag
Get the SupTag object for the given block.
-
#tag(&block) ⇒ Set
Tag messages using the given block.
Instance Method Details
#archive(&block) ⇒ Set
Archive messages using the given block.
19 20 21 22 |
# File 'lib/sup_tag/extensions/Object.rb', line 19 def archive(&block) tagger = get_tagger(&block) tagger.archive(&block) end |
#get_tagger(&block) ⇒ SupTag
Get the SupTag object for the given block.
28 29 30 |
# File 'lib/sup_tag/extensions/Object.rb', line 28 def get_tagger(&block) return SupTag.new(block.binding[:message]) end |
#tag(&block) ⇒ Set
Tag messages using the given block.
10 11 12 13 |
# File 'lib/sup_tag/extensions/Object.rb', line 10 def tag(&block) tagger = get_tagger(&block) tagger.tag(&block) end |