Class: Step4RailsResourceModels
- Inherits:
-
KDomain::DomainModel::Step
- Object
- KDomain::DomainModel::Step
- Step4RailsResourceModels
- Defined in:
- lib/k_domain/domain_model/transform_steps/step4_rails_resource_models.rb
Overview
Locate rails model files
Instance Attribute Summary collapse
-
#ruby_code ⇒ Object
Returns the value of attribute ruby_code.
Attributes inherited from KDomain::DomainModel::Step
Instance Method Summary collapse
Methods inherited from KDomain::DomainModel::Step
#camel, #database, #database=, #database_foreign_keys, #database_tables, #domain, #domain_models, #find_foreign_table, #find_rails_structure_models, #find_table_for_model, #guard, #initialize, #investigate, #issues, #rails_resource, #rails_resource_controllers, #rails_resource_models, #rails_resource_models=, #rails_resource_routes, #rails_resource_routes=, #rails_structure, #rails_structure_controllers, #rails_structure_controllers=, #rails_structure_models, #rails_structure_models=, run, #table_name_exist?, #warning, #write
Constructor Details
This class inherits a constructor from KDomain::DomainModel::Step
Instance Attribute Details
#ruby_code ⇒ Object
Returns the value of attribute ruby_code.
5 6 7 |
# File 'lib/k_domain/domain_model/transform_steps/step4_rails_resource_models.rb', line 5 def ruby_code @ruby_code end |
Instance Method Details
#call ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/k_domain/domain_model/transform_steps/step4_rails_resource_models.rb', line 7 def call raise 'Model path not supplied' if opts[:model_path].nil? self.rails_resource_models = domain_models.map do |model| locate_rails_model(model[:name], model[:table_name]) end end |