class SoberSwag::Reporting::Input::Defer

Resolve circular references by deferring the loading of an input.

Attributes

other_lazy[R]

Public Class Methods

new(other_lazy) click to toggle source
# File lib/sober_swag/reporting/input/defer.rb, line 7
def initialize(other_lazy)
  @other_lazy = other_lazy
end

Public Instance Methods

call(input) click to toggle source
# File lib/sober_swag/reporting/input/defer.rb, line 19
def call(input)
  other.call(input)
end
other() click to toggle source
# File lib/sober_swag/reporting/input/defer.rb, line 13
def other
  return @other if defined?(@other)

  @other = other_lazy.call
end
swagger_schema() click to toggle source
# File lib/sober_swag/reporting/input/defer.rb, line 23
def swagger_schema
  other.swagger_schema
end