Class: Contracts::Formatters::ObjectInspectWrapper
- Inherits:
-
Object
- Object
- Contracts::Formatters::ObjectInspectWrapper
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
127
128
129
|
# File 'lib/contracts-ruby2/lib/contracts/formatters.rb', line 127
def custom_to_s?
!@value.to_s.match(/#\<\w+:.+\>/)
end
|
#useful_inspect ⇒ Object
131
132
133
|
# File 'lib/contracts-ruby2/lib/contracts/formatters.rb', line 131
def useful_inspect
strip_prefix(empty_to_s? ? @value.class.name : @value.inspect)
end
|