class SuperDiff::OperationTreeFlatteners::DefaultObject

Protected Instance Methods

close_token() click to toggle source
# File lib/super_diff/operation_tree_flatteners/default_object.rb, line 14
def close_token
  "}>"
end
item_prefix_for(operation) click to toggle source
# File lib/super_diff/operation_tree_flatteners/default_object.rb, line 18
def item_prefix_for(operation)
  key =
    # Note: We could have used the right_key here too, they're both the
    # same keys
    if operation.respond_to?(:left_key)
      operation.left_key
    else
      operation.key
    end

  "@#{key}="
end
open_token() click to toggle source
# File lib/super_diff/operation_tree_flatteners/default_object.rb, line 6
def open_token
  "#<#{operation_tree.underlying_object.class.name}:" +
    SuperDiff::Helpers.object_address_for(
      operation_tree.underlying_object
    ) +
    " {"
end