initialize

in app/components/primer/beta/avatar.rb [53:71]


      def initialize(src:, alt:, size: DEFAULT_SIZE, shape: DEFAULT_SHAPE, href: nil, **system_arguments)
        @href = href
        @system_arguments = deny_tag_argument(**system_arguments)
        @system_arguments[:tag] = :img
        @system_arguments[:src] = src
        @system_arguments[:alt] = alt
        @system_arguments[:size] = fetch_or_fallback(SIZE_OPTIONS, size, DEFAULT_SIZE)
        @system_arguments[:height] = @system_arguments[:size]
        @system_arguments[:width] = @system_arguments[:size]

        @system_arguments[:classes] = class_names(
          system_arguments[:classes],
          "avatar",
          "avatar-small" => size < SMALL_THRESHOLD,
          "circle" => shape == DEFAULT_SHAPE,
          "lh-0" => href 
        )
      end