From 22560fbfbe2214f260c71c0ae5c928f81a431b76 Mon Sep 17 00:00:00 2001 From: mms Date: Tue, 12 Nov 2024 22:50:10 +0100 Subject: feat: README --- lib/osugiru/message.rb | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'lib/osugiru/message.rb') 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 -- cgit v1.2.3