Skip to content

Commit

Permalink
add shiki gram
Browse files Browse the repository at this point in the history
  • Loading branch information
Ifiht committed Jan 18, 2024
1 parent 3984d61 commit 35017ed
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/lib/shiki_gram.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require "yaml"

class ShikiGram
def wrap_msg(msg)
msg_str = msg.to_yaml
msg64 = Base64.encode64(msg_str)
return msg64
end

def open_msg(msg64)
msg_str = Base64.decode64(msg64)
msg = YAML.load(msg_str)
return msg
end
end

0 comments on commit 35017ed

Please sign in to comment.