lib/eco/api/common/people/person_entry.rb in eco-helpers-2.0.7 vs lib/eco/api/common/people/person_entry.rb in eco-helpers-2.0.8

- old
+ new

@@ -152,17 +152,23 @@ def default_tag final_entry["default_tag"] end - # Provides a reference of this person. + # Provides a reference to this person entry. # @return [String] string summary of this person identity. + def identify + str_id = id ? "id: '#{id}'; " : "" + "(row: #{idx}) '#{name}' (#{str_id}ext_id: '#{external_id}'; email: '#{email}')" + end + + # Provides a reference of this person entry. + # @return [String] string summary of this person identity. def to_s(options) options = into_a(options) case when options.include?(:identify) - str_id = id ? "id: '#{id}'; " : "" - "(row: #{idx}) '#{name}' (#{str_id}ext_id: '#{external_id}'; email: '#{email}')" + identify else final_entry.each.map do |k, v| "'#{k}': '#{v.to_json}'" end.join(" | ") end