def attribute(name, **opts, &block)
      raise AttributorException, "Attribute names must be symbols, got: #{name.inspect}" unless name.is_a? ::Symbol

      attribute = schema.attributes.fetch(name) do
        raise "Displaying :#{name} is not allowed in view :#{self.name} of #{schema}. This attribute does not exist in the mediatype"
      end

      if block_given?
        type = attribute.type
        @contents[name] = if type < Attributor::Collection
                            CollectionView.new(name, type.member_attribute.type, &block)
                          else
                            View.new(name, attribute, &block)
                          end
      else
        type = attribute.type
        if type < Attributor::Collection
          is_collection = true
          type = type.member_attribute.type
        end

        if type < Praxis::Blueprint
          view_name = opts[:view] || :default
          view = type.views.fetch(view_name) do
            raise "view with name '#{view_name.inspect}' is not defined in #{type}"
          end
          @contents[name] = if is_collection
                              Praxis::CollectionView.new(view_name, type, view)
                            else
                              view
                            end
        else
          @contents[name] = attribute # , opts]
        end
      end
    end
def attribute(name, **opts, &block)
      raise AttributorException, "Attribute names must be symbols, got: #{name.inspect}" unless name.is_a? ::Symbol

      attribute = schema.attributes.fetch(name) do
        raise "Displaying :#{name} is not allowed in view :#{self.name} of #{schema}. This attribute does not exist in the mediatype"
      end

      if block_given?
        type = attribute.type
        @contents[name] = if type < Attributor::Collection
                            CollectionView.new(name, type.member_attribute.type, &block)
                          else
                            View.new(name, attribute, &block)
                          end
      else
        type = attribute.type
        if type < Attributor::Collection
          is_collection = true
          type = type.member_attribute.type
        end

        if type < Praxis::Blueprint
          view_name = opts[:view] || :default
          view = type.views.fetch(view_name) do
            raise "view with name '#{view_name.inspect}' is not defined in #{type}"
          end
          @contents[name] = if is_collection
                              Praxis::CollectionView.new(view_name, type, view)
                            else
                              view
                            end
        else
          @contents[name] = attribute # , opts]
        end
      end
    end
Why did we need this again?