Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/softlayer.rb
Instance Method Summary collapse
- #camelize_keys ⇒ Object
- #camelize_keys! ⇒ Object
- #to_softlayer ⇒ Object
- #to_softlayer_filter ⇒ Object
Instance Method Details
#camelize_keys ⇒ Object
143 144 145 |
# File 'lib/softlayer.rb', line 143 def camelize_keys dup.camelize_keys! end |
#camelize_keys! ⇒ Object
147 148 149 150 151 152 153 |
# File 'lib/softlayer.rb', line 147 def camelize_keys! each do |v| v.camelize_keys! if v.is_a?(Hash) v.camelize_keys! if v.is_a?(Array) end self end |
#to_softlayer ⇒ Object
155 156 157 158 159 160 161 162 163 164 165 |
# File 'lib/softlayer.rb', line 155 def to_softlayer ary = [] self.each do |item| if item.respond_to?(:to_softlayer) ary << item.to_softlayer else ary << item end end [ary] end |
#to_softlayer_filter ⇒ Object
167 168 169 170 171 172 173 174 175 176 177 |
# File 'lib/softlayer.rb', line 167 def to_softlayer_filter ary = [] self.each do |item| if item.respond_to?(:to_softlayer_filter) ary << item.to_softlayer_filter else ary << item end end [ary] end |