diff options
author | mms <git@sapka.me> | 2024-11-12 22:50:10 +0100 |
---|---|---|
committer | mms <git@sapka.me> | 2024-11-12 23:12:55 +0100 |
commit | 22560fbfbe2214f260c71c0ae5c928f81a431b76 (patch) | |
tree | 0b47e7c63f715fab3a347bf08d5f50ea9e8a9561 /lib/osugiru/message.rb | |
parent | 955739e2a7be70e6abf7e95710ffe0f4a9c64481 (diff) |
feat: README
Diffstat (limited to 'lib/osugiru/message.rb')
-rw-r--r-- | lib/osugiru/message.rb | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/lib/osugiru/message.rb b/lib/osugiru/message.rb index 3446f17..0555724 100644 --- a/lib/osugiru/message.rb +++ b/lib/osugiru/message.rb @@ -6,9 +6,10 @@ module Osugiru def initialize(msg:) @message = msg + @tags = @message.tags end - def method_missing(method_name, *_args) + def method_missing(method_name, *_args) handle_get(Osugiru::Helpers.header_name_from_dsl(method_name)) end @@ -17,7 +18,19 @@ module Osugiru end def tags - @message.tags + @tags + end + + def tags=(new_tags) + @tags = new_tags + end + + def save! + message.remove_all_tags + tags.each do |tag| + message.add_tag(tag) + end + binding.pry end end end |