Class: SwaggerCodegenRails::Parameter
- Inherits:
-
Struct
- Object
- Struct
- SwaggerCodegenRails::Parameter
- Defined in:
- lib/swagger_codegen_rails/parameter.rb
Instance Attribute Summary collapse
-
#in ⇒ Object
Returns the value of attribute in.
-
#name ⇒ Object
Returns the value of attribute name.
-
#required ⇒ Object
Returns the value of attribute required.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
Instance Attribute Details
#in ⇒ Object
Returns the value of attribute in
2 3 4 |
# File 'lib/swagger_codegen_rails/parameter.rb', line 2 def in @in end |
#name ⇒ Object
Returns the value of attribute name
2 3 4 |
# File 'lib/swagger_codegen_rails/parameter.rb', line 2 def name @name end |
#required ⇒ Object
Returns the value of attribute required
2 3 4 |
# File 'lib/swagger_codegen_rails/parameter.rb', line 2 def required @required end |
#type ⇒ Object
Returns the value of attribute type
2 3 4 |
# File 'lib/swagger_codegen_rails/parameter.rb', line 2 def type @type end |
Instance Method Details
#devide(arg_str) ⇒ Object
18 19 20 |
# File 'lib/swagger_codegen_rails/parameter.rb', line 18 def devide(arg_str) arg_str.split(":", 4) end |
#map_params(str) ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/swagger_codegen_rails/parameter.rb', line 7 def map_params(str) params = devide(str) self.each_with_index do |_v, i| self[i] = params[i].blank? ? "TODO" : params[i] end rescue IndexError => e logger.error e logger.error e.backtrace.join("\n") return nil end |