Method: Roby::Application#model_defined_in_app?

Defined in:
lib/roby/app.rb

#model_defined_in_app?(model) ⇒ Boolean

Tests whether a model class has been defined in this app’s code

Returns:

  • (Boolean)


2985
2986
2987
2988
2989
2990
2991
# File 'lib/roby/app.rb', line 2985

def model_defined_in_app?(model)
    model.definition_location.any? do |location|
        break if location.label == "require"

        app_file?(location.absolute_path)
    end
end