def inspect
      attribute_values = self.class.attributes
        .inject({}) { |hash, attribute| hash.update(attribute.name => send(attribute.name)) }
        .reject { |name, value| value.nil? or (value.respond_to?(:empty?) and value.empty?) }
      attributes = attribute_values
        .map { |name, value| "#{name}=#{value.inspect}" }
        .join(" ")

      class_name = self.class.name
      hex_code = "0x#{(object_id >> 1).to_s(16)}"

      "#<#{class_name}:#{hex_code} #{attributes}>"
    end
def inspect
      attribute_values = self.class.attributes
        .inject({}) { |hash, attribute| hash.update(attribute.name => send(attribute.name)) }
        .reject { |name, value| value.nil? or (value.respond_to?(:empty?) and value.empty?) }
      attributes = attribute_values
        .map { |name, value| "#{name}=#{value.inspect}" }
        .join(" ")

      class_name = self.class.name
      hex_code = "0x#{(object_id >> 1).to_s(16)}"

      "#<#{class_name}:#{hex_code} #{attributes}>"
    end
Displays all the attributes and their values.