Module: RTM::AR::TOSTRING::Occurrence

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

Instance Method Summary collapse

Instance Method Details

#to_s(style = :short) ⇒ Object



98
99
100
101
102
103
104
105
106
107
108
109
# File 'lib/rtm/activerecord/io/to_string.rb', line 98

def to_s(style=:short)
  case style
  when :short
    value
  when :long
    r = " #{reifier.to_s(:short)}" if reifier
    i = " iids=#{item_identifiers.to_s}" 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