Module: RTM::IO::ToString::Occurrence

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

Instance Method Summary

Instance Method Details

- (Object) to_s(style = :short)



106
107
108
109
110
111
112
113
114
115
116
117
# File 'rtm/lib/rtm/io/to_string.rb', line 106

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::Occurrence id=#{id}#{i}#{r} type=#{type.to_s(:short)} value=#{value} datatype=#{datatype}>"
  else
    super() # these () are needed, otherwise the own parameters are passed in
  end
end