Class: ApimaticApi::SdkLanguages
- Inherits:
-
Object
- Object
- ApimaticApi::SdkLanguages
- Defined in:
- lib/apimatic_api/models/sdk_languages.rb
Overview
Languages for which SDKs can be generated.
Constant Summary collapse
- SDK_LANGUAGES =
[ # C# CSHARP = 'csharp'.freeze, # Java JAVA = 'java'.freeze, # PHP PHP = 'php'.freeze, # Python PYTHON = 'python'.freeze, # Ruby RUBY = 'ruby'.freeze, # Typescript TYPESCRIPT = 'typescript'.freeze, # Go GO = 'go'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = CSHARP) ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/apimatic_api/models/sdk_languages.rb', line 38 def self.from_value(value, default_value = CSHARP) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'csharp' then CSHARP when 'java' then JAVA when 'php' then PHP when 'python' then PYTHON when 'ruby' then RUBY when 'typescript' then TYPESCRIPT when 'go' then GO else default_value end end |
.validate(value) ⇒ Object
32 33 34 35 36 |
# File 'lib/apimatic_api/models/sdk_languages.rb', line 32 def self.validate(value) return false if value.nil? SDK_LANGUAGES.include?(value) end |