Class: Apipie::ParamDescription::Deprecation
- Inherits:
-
Object
- Object
- Apipie::ParamDescription::Deprecation
- Defined in:
- lib/apipie/param_description/deprecation.rb
Overview
Data transfer object, used when param description is deprecated
Instance Attribute Summary collapse
-
#deprecated_in ⇒ Object
readonly
Returns the value of attribute deprecated_in.
-
#info ⇒ Object
readonly
Returns the value of attribute info.
-
#sunset_at ⇒ Object
readonly
Returns the value of attribute sunset_at.
Instance Method Summary collapse
-
#initialize(info: nil, deprecated_in: nil, sunset_at: nil) ⇒ Deprecation
constructor
A new instance of Deprecation.
- #to_json(*_args) ⇒ Object
Constructor Details
#initialize(info: nil, deprecated_in: nil, sunset_at: nil) ⇒ Deprecation
Returns a new instance of Deprecation.
9 10 11 12 13 |
# File 'lib/apipie/param_description/deprecation.rb', line 9 def initialize(info: nil, deprecated_in: nil, sunset_at: nil) @info = info @deprecated_in = deprecated_in @sunset_at = sunset_at end |
Instance Attribute Details
#deprecated_in ⇒ Object (readonly)
Returns the value of attribute deprecated_in.
7 8 9 |
# File 'lib/apipie/param_description/deprecation.rb', line 7 def deprecated_in @deprecated_in end |
#info ⇒ Object (readonly)
Returns the value of attribute info.
7 8 9 |
# File 'lib/apipie/param_description/deprecation.rb', line 7 def info @info end |
#sunset_at ⇒ Object (readonly)
Returns the value of attribute sunset_at.
7 8 9 |
# File 'lib/apipie/param_description/deprecation.rb', line 7 def sunset_at @sunset_at end |
Instance Method Details
#to_json(*_args) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/apipie/param_description/deprecation.rb', line 15 def to_json(*_args) { info: @info, deprecated_in: @deprecated_in, sunset_at: @sunset_at } end |