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, #to_s

Instance Method Details

#custom_to_s?Boolean

Returns:

  • (Boolean)


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

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

#useful_inspectObject



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

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