Module: RTM::IO::ToString::Variant

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

Instance Method Summary

Instance Method Details

- (Object) to_s(style = :short)



121
122
123
124
125
126
127
128
129
130
131
132
# File 'rtm/lib/rtm/io/to_string.rb', line 121

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