lib/contrast/framework/sinatra/support.rb in contrast-agent-4.2.0 vs lib/contrast/framework/sinatra/support.rb in contrast-agent-4.3.0

- old
+ new

@@ -6,11 +6,12 @@ module Contrast module Framework module Sinatra # Used when Sinatra is present to define framework specific behavior - class Support < BaseSupport + class Support + extend Contrast::Framework::BaseSupport extend Contrast::Framework::Sinatra::Patch::Support class << self def detection_class 'Sinatra' end @@ -65,10 +66,10 @@ end private def app_class - return nil unless defined?(::Sinatra) && defined?(::Sinatra::Base) + return unless defined?(::Sinatra) && defined?(::Sinatra::Base) @_app_class ||= begin sinatra_layers = ObjectSpace.each_object(::Sinatra::Base).to_a result_layer = sinatra_layers.find { |layer| layer.app.nil? } result_layer