Class: R2OAS::Deprecation
- Includes:
- Behavior, InstanceDelegator, Reporting, Singleton
- Defined in:
- lib/r2-oas/support/deprecation.rb,
lib/r2-oas/support/deprecation/behavior.rb,
lib/r2-oas/support/deprecation/reporting.rb,
lib/r2-oas/support/deprecation/instance_delegator.rb
Defined Under Namespace
Modules: Behavior, InstanceDelegator, Reporting Classes: DeprecationError
Constant Summary collapse
- DEFAULT_BEHAVIORS =
{ stderr: lambda { |, _callstack, _deprecation_horizon, _gem_name| $stderr.puts() } }.freeze
Constants included from Reporting
Reporting::FILE_LINE_METHOD_REGEXP, Reporting::R2OAS_GEM_ROOT
Instance Attribute Summary collapse
-
#deprecation_horizon ⇒ Object
The version number in which the deprecated behavior will be removed, by default.
Attributes included from Reporting
Instance Method Summary collapse
-
#initialize(deprecation_horizon = '0.4.2', gem_name = 'r2-oas') ⇒ Deprecation
constructor
A new instance of Deprecation.
Methods included from Reporting
Methods included from Behavior
Methods included from InstanceDelegator
Constructor Details
#initialize(deprecation_horizon = '0.4.2', gem_name = 'r2-oas') ⇒ Deprecation
Returns a new instance of Deprecation.
20 21 22 23 24 |
# File 'lib/r2-oas/support/deprecation.rb', line 20 def initialize(deprecation_horizon = '0.4.2', gem_name = 'r2-oas') self.gem_name = gem_name self.deprecation_horizon = deprecation_horizon self.silenced = false end |
Instance Attribute Details
#deprecation_horizon ⇒ Object
The version number in which the deprecated behavior will be removed, by default.
18 19 20 |
# File 'lib/r2-oas/support/deprecation.rb', line 18 def deprecation_horizon @deprecation_horizon end |