Module: Spider::App::AppClass::ClassMethods

Defined in:
lib/spiderfw/app.rb

Instance Method Summary collapse

Instance Method Details

#appApp

Returns The app to which the class belongs.

Returns:

  • (App)

    The app to which the class belongs



675
676
677
678
679
680
681
682
683
# File 'lib/spiderfw/app.rb', line 675

def app
    return @app if @app
    @app ||= self.parent_module
    while @app && !@app.include?(Spider::App) && @app != Object
        @app = @app.parent_module
    end
    @app = nil if @app && !@app.include?(Spider::App)
    return @app
end