def build_spaceship_method
      ''.tap do |body|

        body << <<-RUBY
          def <=>(other)
        RUBY

        if type_guard?
          body << <<-RUBY
              unless other.kind_of?(#{type_guard_value})
                raise TypeError, "\#{other.inspect} must be kind of \#{#{type_guard_value}}"
              end
          RUBY
        end

        body << <<-RUBY
            #{join_attributes}
        RUBY

        body << <<-RUBY
          end
        RUBY
      end
    end
def build_spaceship_method
      ''.tap do |body|

        body << <<-RUBY
          def <=>(other)
        RUBY

        if type_guard?
          body << <<-RUBY
              unless other.kind_of?(#{type_guard_value})
                raise TypeError, "\#{other.inspect} must be kind of \#{#{type_guard_value}}"
              end
          RUBY
        end

        body << <<-RUBY
            #{join_attributes}
        RUBY

        body << <<-RUBY
          end
        RUBY
      end
    end
Generates the spaceship method body.

 @return [String]