Top Level Namespace
Defined Under Namespace
Modules: Ionoscloud
Constant Summary collapse
- TooManyRequests =
429
- BadGateway =
502
503
- GatewayTimeout =
504
Instance Method Summary collapse
Instance Method Details
#get_class(operation) ⇒ Object
23 24 25 26 27 28 29 30 31 32 |
# File 'lib/test_driver.rb', line 23 def get_class(operation) Ionoscloud.constants.select do |c| Ionoscloud.const_get(c).is_a? Class and Ionoscloud.const_get(c).name.end_with? 'Api' end.each do |class_symbol| class_name = class_symbol.to_s methods = Ionoscloud.const_get(class_name).new.methods - Object.methods return Ionoscloud.const_get(class_name) if methods.map(&:to_s).include? operation end nil end |
#underscore_string(str) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/test_driver.rb', line 15 def underscore_string(str) str.gsub(/::/, '/') .gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2') .gsub(/([a-z\d])([A-Z])/, '\1_\2') .tr('-', '_') .downcase end |