Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/rcap/extensions/array.rb

Instance Method Summary (collapse)

Instance Method Details

- (String) to_s_for_cap

Formats an array into a string suitable for a CAP message.

Examples:

[ "one", "two words", "three" ].to_s_for_cap # => "one \"two words\" three"

Returns:

See Also:



8
9
10
# File 'lib/rcap/extensions/array.rb', line 8

def to_s_for_cap
  self.map{ |element| element.to_s.for_cap_list }.join( ' ' )
end