Class: KDomain::Schemas::RailsStructure
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- KDomain::Schemas::RailsStructure
show all
- Defined in:
- lib/k_domain/schemas/rails_structure.rb
Defined Under Namespace
Classes: AfterAction, AroundAction, BeforeAction, BeforeFilter, BelongsTo, Controller, ControllerActions, ControllerBehaviours, DefaultScope, Functions, HasAndBelongsToMany, HasMany, HasOne, Helper, HelperMethod, HttpBasicAuthenticateWith, Layout, Method, Model, ModelBehaviours, NameOptsType, OptsType, Prepend_beforeAction, ProtectFromForgery, RescueFrom, Scope, SkipBeforeFilter, Skip_beforeAction, Validate, Validates
Instance Method Summary
collapse
Instance Method Details
#find_controller(path) ⇒ Object
169
170
171
172
|
# File 'lib/k_domain/schemas/rails_structure.rb', line 169
def find_controller(path)
path = path.to_s
controllers.find { |controller| controller.path.to_s == path }
end
|
#find_model(name) ⇒ Object
174
175
176
177
|
# File 'lib/k_domain/schemas/rails_structure.rb', line 174
def find_model(name)
name = name.to_s
models.find { |model| model.model_name.to_s == name }
end
|