Parent

Class/Module Index [+]

Quicksearch

String

some helpers for some dirty work


some helpers for some dirty work


some helpers for some dirty work

Public Instance Methods

fix_convention_exceptions() click to toggle source
# File lib/fog/softlayer/core.rb, line 151
def fix_convention_exceptions
  # SLAPI WHY U No Follow Own Convention!?
  self.gsub!(/ipaddress/, 'IpAddress')
  self.gsub!(/loadbalancer/, 'LoadBalancer')
end
softlayer_camelize() click to toggle source
# File lib/fog/softlayer/compute.rb, line 136
def softlayer_camelize
  self.split('_').inject([]){ |buffer,e| buffer.push(buffer.empty? ? e : e.capitalize) }.join
end
softlayer_underscore() click to toggle source
# File lib/fog/softlayer/compute.rb, line 140
def softlayer_underscore
  self.gsub(/::/, '/').
      gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
      gsub(/([a-z\d])([A-Z])/,'\1_\2').
      tr("-", "_").
      downcase
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.