Class: OpenApi::ServerVariable
- Inherits:
-
Object
- Object
- OpenApi::ServerVariable
- Includes:
- EquatableAsContent
- Defined in:
- lib/open_api/server_variable.rb
Overview
Instance Attribute Summary collapse
-
#default ⇒ Object
Returns the value of attribute default.
-
#description ⇒ Object
Returns the value of attribute description.
-
#enum ⇒ Object
Returns the value of attribute enum.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(enum: nil, default:, description: nil) ⇒ ServerVariable
constructor
A new instance of ServerVariable.
Methods included from EquatableAsContent
Constructor Details
#initialize(enum: nil, default:, description: nil) ⇒ ServerVariable
Returns a new instance of ServerVariable.
8 9 10 11 12 |
# File 'lib/open_api/server_variable.rb', line 8 def initialize(enum: nil, default:, description: nil) self.enum = enum self.default = default self.description = description end |
Instance Attribute Details
#default ⇒ Object
Returns the value of attribute default.
6 7 8 |
# File 'lib/open_api/server_variable.rb', line 6 def default @default end |
#description ⇒ Object
Returns the value of attribute description.
6 7 8 |
# File 'lib/open_api/server_variable.rb', line 6 def description @description end |
#enum ⇒ Object
Returns the value of attribute enum.
6 7 8 |
# File 'lib/open_api/server_variable.rb', line 6 def enum @enum end |
Class Method Details
.load(hash) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/open_api/server_variable.rb', line 14 def self.load(hash) new( enum: hash["enum"], default: hash["default"], description: hash["description"], ) end |