Method: Yadriggy::Assert::Reason#str_rep

Defined in:
lib/yadriggy/assert.rb

#str_rep(v) ⇒ Object

Obtains the text representation of the given value.



141
142
143
144
145
146
147
148
149
# File 'lib/yadriggy/assert.rb', line 141

def str_rep(v)
  max = 70
  str = v.inspect
  if str.length < max
    str
  else
    str[0, max] + '...'
  end
end