Module: RTM::IO::ToString::Association
- Defined in:
- rtm/lib/rtm/io/to_string.rb
Instance Method Summary
Instance Method Details
- (Object) to_s(style = :short)
57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'rtm/lib/rtm/io/to_string.rb', line 57 def to_s(style=:short) case style when :short r = " #{reifier.to_s(:short)}" if reifier i = " iids=#{delocatorized item_identifiers}" unless item_identifiers.empty? "#<RTM::Association id=#{id}#{i}#{r}>" when :long r = " #{reifier.to_s(:short)}" if reifier i = " iids=#{delocatorized item_identifiers}" unless item_identifiers.empty? "#<RTM::Association id=#{id}#{i}#{r} type=#{type.to_s(:short)} roles=[#{roles.entries.map { |ar| ar.to_s(:long) }.join(", ")}]>" else super() # these () are needed, otherwise the own parameters are passed in end end |