diff options
Diffstat (limited to 'lib/chotto/message.rb')
-rw-r--r-- | lib/chotto/message.rb | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/chotto/message.rb b/lib/chotto/message.rb index ff382f8..282a030 100644 --- a/lib/chotto/message.rb +++ b/lib/chotto/message.rb @@ -11,18 +11,20 @@ module Chotto end def method_missing(method_name, *_args) - handle_get(Chotto::Helpers.header_name_from_dsl(method_name)) - end - - def handle_get(header_name) - message.header(header_name) if message.header(header_name) + handle_get_header(Chotto::Helpers.header_name_from_dsl(method_name)) end def save! message.remove_all_tags tags.each do |tag| - message.add_tag(tag) + message.add_tag(tag.to_s) end end + + private + + def handle_get_header(header_name) + message.header(header_name) + end end end |