Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/rtp-connect/ruby_extensions.rb
Overview
Extension to the Array class. These facilitate the creation of RTPConnect strings from an array of values.
Instance Method Summary collapse
-
#encode ⇒ String
Encodes an RTPConnect string from an array of values.
Instance Method Details
#encode ⇒ String
Encodes an RTPConnect string from an array of values. Each value in the array is wrapped with double quotes, before the values are joined with a comma separator.
74 75 76 77 |
# File 'lib/rtp-connect/ruby_extensions.rb', line 74 def encode wrapped = self.collect{|value| value.wrap} return wrapped.join(',') end |