Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

1# frozen_string_literal: true
2
3class REST::AnnualReportSerializer < ActiveModel::Serializer
4 attributes :year, :data, :schema_version
5end
6

After

1# frozen_string_literal: true
2
3class REST::AnnualReportSerializer < ActiveModel::Serializer
4 attributes :year, :data, :schema_version, :share_url
5
6 def share_url
7 public_wrapstodon_url(object.account, object.year, object.share_key) if object.share_key.present?
8 end
9end
10

Before

program
comment "# frozen_string_literal: true"
class
class "class"
scope_resolution
constant "REST"
:: "::"
constant "AnnualReportSerializer"
superclass
< "<"
scope_resolution
constant "ActiveModel"
:: "::"
constant "Serializer"
body_statement
call
identifier "attributes"
argument_list
simple_symbol ":year"
, ","
simple_symbol ":data"
, ","
simple_symbol ":schema_version"
end "end"

After

program
comment "# frozen_string_literal: true"
class
class "class"
scope_resolution
constant "REST"
:: "::"
constant "AnnualReportSerializer"
superclass
< "<"
scope_resolution
constant "ActiveModel"
:: "::"
constant "Serializer"
body_statement
call
identifier "attributes"
argument_list
simple_symbol ":year"
, ","
simple_symbol ":data"
, ","
simple_symbol ":schema_version"
, ","
simple_symbol ":share_url"
method
def "def"
identifier "share_url"
body_statement
if_modifier
call
identifier "public_wrapstodon_url"
argument_list
( "("
call
identifier "object"
. "."
identifier "account"
, ","
call
identifier "object"
. "."
identifier "year"
, ","
call
identifier "object"
. "."
identifier "share_key"
) ")"
if "if"
call
call
identifier "object"
. "."
identifier "share_key"
. "."
identifier "present?"
end "end"
end "end"