module CloudstackClient::Utils
Public Instance Methods
Source
# File lib/cloudstack_client/utils.rb 4 def camel_case_to_underscore(camel_case) 5 camel_case.gsub(/::/, '/'). 6 gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2'). 7 gsub(/([a-z\d])([A-Z])/,'\1_\2'). 8 tr("-", "_").downcase 9 end
Source
# File lib/cloudstack_client/utils.rb 20 def print_debug_output(output, separator = '-' * 80) 21 puts 22 puts separator 23 puts output 24 puts separator 25 puts 26 end
Source
# File lib/cloudstack_client/utils.rb 11 def underscore_to_camel_case(underscore) 12 if underscore.include? "_" 13 string = underscore.split('_').collect(&:capitalize).join 14 string[0].downcase + string[1..-1] 15 else 16 underscore 17 end 18 end