Sha256: a097345ea81ea68f71f3bf5c955f905c1b652c30ecf1a533207970816b956c89
Contents?: true
Size: 451 Bytes
Versions: 13
Compression:
Stored size: 451 Bytes
Contents
module Telegram module Bot module Types module Compactable def to_compact_hash Hash[attributes.dup.delete_if { |_, v| v.nil? }.map do |key, value| value = if value.class.ancestors.include?(Telegram::Bot::Types::Base) value.to_compact_hash else value end [key, value] end] end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems