Skip to content

Commit 2eac3d6

Browse files
lcpriestjohnnyshields
authored andcommitted
Exclude 'gmail' when attempting to display a message as_json (#259)
1 parent bdd5983 commit 2eac3d6

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

lib/gmail/message.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,10 @@ def inspect
164164
"#<Gmail::Message#{'0x%04x' % (object_id << 1)} mailbox=#{@mailbox.name}#{' uid=' + @uid.to_s if @uid}#{' message_id=' + @msg_id.to_s if @msg_id}>"
165165
end
166166

167+
def as_json
168+
super(except: ["gmail"])
169+
end
170+
167171
def method_missing(meth, *args, &block)
168172
# Delegate rest directly to the message.
169173
if envelope.respond_to?(meth)

0 commit comments

Comments
 (0)