require 'memoizable' require 'twitter/variant' module Twitter module Media class VideoInfo < Twitter::Base include Memoizable # @return [Array] def variants @attrs.fetch(:variants, []).map do |variant| Variant.new(variant) end end memoize :variants end end end