Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/softlayer/object_mask_helpers.rb

Overview

SoftLayer Extensions to the Array class to support using arrays to create object masks

Instance Method Summary collapse

Instance Method Details

#_to_sl_object_mask_propertyObject

Returns a string representing the object mask content represented by the Array. Each value in the array is converted to its object mask eqivalent This routine is an implementation detail used in the conversion of hashes to object mask strings. You should not have to call this method directly.



74
75
76
77
78
# File 'lib/softlayer/object_mask_helpers.rb', line 74

def _to_sl_object_mask_property()
  return "" if self.empty?
  property_content = map { |item| item ? item._to_sl_object_mask_property() : nil  }.compact.flatten.join(",")
  "#{property_content}"
end