Sha256: 76b64c764ce2c5a5f7ecfb5dd132782731d4edfc8c1404dc2676e364ea57d73e

Contents?: true

Size: 320 Bytes

Versions: 7

Compression:

Stored size: 320 Bytes

Contents

class Array
  # Formats an array into a string suitable for a CAP message.
  #
  # @return [String]
  # @example
  #   [ "one", "two words", "three" ].to_s_for_cap # => "one \"two words\" three"
  # @see String#unpack_cap_list
  def to_s_for_cap
    self.map{ |element| element.to_s.for_cap_list }.join( ' ' )
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
rcap-2.3.0 lib/rcap/extensions/array.rb
rcap-2.2.1 lib/rcap/extensions/array.rb
rcap-2.2.0 lib/rcap/extensions/array.rb
rcap-2.1.0 lib/rcap/extensions/array.rb
rcap-2.0.2 lib/rcap/extensions/array.rb
rcap-2.0.1 lib/rcap/extensions/array.rb
rcap-2.0.0 lib/rcap/extensions/array.rb