Class: Contracts::Formatters::ClassInspectWrapper

Inherits:
Object
  • Object
show all
Includes:
InspectWrapper
Defined in:
lib/contracts/formatters.rb

Instance Method Summary collapse

Methods included from InspectWrapper

create, #delim, #initialize, #inspect, inspector_klass, #to_s

Instance Method Details

#custom_to_s?Boolean

Returns:

  • (Boolean)


112
113
114
# File 'lib/contracts/formatters.rb', line 112

def custom_to_s?
  @value.to_s != @value.name
end

#useful_inspectObject



116
117
118
# File 'lib/contracts/formatters.rb', line 116

def useful_inspect
  strip_prefix(empty_to_s? ? @value.name : @value.inspect)
end