Class: Contracts::Formatters::ClassInspectWrapper
- Inherits:
-
Object
- Object
- Contracts::Formatters::ClassInspectWrapper
show all
- Includes:
- InspectWrapper
- Defined in:
- lib/contracts-ruby2/lib/contracts/formatters.rb,
lib/contracts-ruby3/lib/contracts/formatters.rb
Instance Method Summary
collapse
create, #delim, #initialize, #inspect, #to_s
Instance Method Details
#custom_to_s? ⇒ Boolean
115
116
117
|
# File 'lib/contracts-ruby2/lib/contracts/formatters.rb', line 115
def custom_to_s?
@value.to_s != @value.name
end
|
#useful_inspect ⇒ Object
119
120
121
|
# File 'lib/contracts-ruby2/lib/contracts/formatters.rb', line 119
def useful_inspect
strip_prefix(empty_to_s? ? @value.name : @value.inspect)
end
|