Module: RTM::IO::ToString::Name

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

Instance Method Summary

Instance Method Details

- (Object) to_s(style = :short)



91
92
93
94
95
96
97
98
99
100
101
102
# File 'rtm/lib/rtm/io/to_string.rb', line 91

def to_s(style=:short)
  case style
  when :short
    value
  when :long
    r = " #{reifier.to_s(:short)}" if reifier
    i = " iids=#{delocatorized item_identifiers}" unless item_identifiers.empty?
    "#<RTM::Name id=#{id}#{i}#{r} type=#{type.to_s(:short)} value=#{value} variants:#{variants.size}>"
  else
    super() # these () are needed, otherwise the own parameters are passed in
  end
end