Class: ScaleRb::Types::CompactType

Inherits:
Base
  • Object
show all
Defined in:
lib/scale_rb/types.rb

Constant Summary

Constants inherited from Base

Base::MAX_DEPTH

Instance Method Summary collapse

Methods inherited from Base

#t, #to_s

Instance Method Details

#to_string(depth = 0) ⇒ Object



61
62
63
64
65
66
67
68
69
70
71
# File 'lib/scale_rb/types.rb', line 61

def to_string(depth = 0)
  if type
    if depth > MAX_DEPTH
      'Compact<...>'
    else
      "Compact<#{t(type).to_string(depth + 1)}>"
    end
  else
    'Compact'
  end
end