Class: Trane::ParamDefinition
- Inherits:
-
Data
- Object
- Data
- Trane::ParamDefinition
- Defined in:
- lib/trane/param_definition.rb
Instance Attribute Summary collapse
-
#enum ⇒ Object
readonly
Returns the value of attribute enum.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#required ⇒ Object
readonly
Returns the value of attribute required.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(name:, type:, location:, required: false, enum: nil) ⇒ ParamDefinition
constructor
Build a frozen param definition for an operation request schema.
Constructor Details
#initialize(name:, type:, location:, required: false, enum: nil) ⇒ ParamDefinition
Build a frozen param definition for an operation request schema.
15 16 17 18 19 20 21 22 23 |
# File 'lib/trane/param_definition.rb', line 15 def initialize(name:, type:, location:, required: false, enum: nil) super( name: name.to_sym, type: type.to_sym, required: required, location: location.to_sym, enum: enum&.freeze ) end |
Instance Attribute Details
#enum ⇒ Object (readonly)
Returns the value of attribute enum
4 5 6 |
# File 'lib/trane/param_definition.rb', line 4 def enum @enum end |
#location ⇒ Object (readonly)
Returns the value of attribute location
4 5 6 |
# File 'lib/trane/param_definition.rb', line 4 def location @location end |
#name ⇒ Object (readonly)
Returns the value of attribute name
4 5 6 |
# File 'lib/trane/param_definition.rb', line 4 def name @name end |
#required ⇒ Object (readonly)
Returns the value of attribute required
4 5 6 |
# File 'lib/trane/param_definition.rb', line 4 def required @required end |
#type ⇒ Object (readonly)
Returns the value of attribute type
4 5 6 |
# File 'lib/trane/param_definition.rb', line 4 def type @type end |