Class: Apipie::ParamDescription::Deprecation

Inherits:
Object
  • Object
show all
Defined in:
lib/apipie/param_description/deprecation.rb

Overview

Data transfer object, used when param description is deprecated

Instance Attribute Summary collapse

Instance Method Summary collapse

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_inObject (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

#infoObject (readonly)

Returns the value of attribute info.



7
8
9
# File 'lib/apipie/param_description/deprecation.rb', line 7

def info
  @info
end

#sunset_atObject (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