Sha256: 05d88b737792d8502091a876f847fc5e5d0f57eac80c61d9b41f5f2b44870874
Contents?: true
Size: 473 Bytes
Versions: 15
Compression:
Stored size: 473 Bytes
Contents
module Telegram module Bot module Types class Base include Virtus.model 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
15 entries across 15 versions & 1 rubygems