Module: RTM::IO::ToString::Role

Defined in:
rtm/lib/rtm/io/to_string.rb

Instance Method Summary

Instance Method Details

- (Object) to_s(style = :short)



74
75
76
77
78
79
80
81
82
83
84
85
86
87
# File 'rtm/lib/rtm/io/to_string.rb', line 74

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::Role id=#{id}#{i}#{r}>"
  when :long
    r = " #{reifier.to_s(:short)}" if reifier
    i = " iids=#{delocatorized item_identifiers}" unless item_identifiers.empty?
    "#<RTM::Role id=#{id}#{i}#{r} type=#{type.to_s(:short)} player=#{player.to_s(:short)}>"
  else
    super() # these () are needed, otherwise the own parameters are passed in
  end
end