Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/rcap/extensions/array.rb
Instance Method Summary collapse
- #blank? ⇒ Boolean
- #extract_options! ⇒ Object
-
#to_s_for_cap ⇒ String
Formats an array into a string suitable for a CAP message.
Instance Method Details
#blank? ⇒ Boolean
12 13 14 |
# File 'lib/rcap/extensions/array.rb', line 12 def blank? empty? end |
#extract_options! ⇒ Object
16 17 18 |
# File 'lib/rcap/extensions/array.rb', line 16 def last.is_a?(Hash) ? pop : {} end |
#to_s_for_cap ⇒ String
Formats an array into a string suitable for a CAP message.
8 9 10 |
# File 'lib/rcap/extensions/array.rb', line 8 def to_s_for_cap map { |element| element.to_s.for_cap_list }.join(' ') end |