aboutsummaryrefslogtreecommitdiff
path: root/lib/osugiru/message.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/osugiru/message.rb')
-rw-r--r--lib/osugiru/message.rb17
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