Module: RailsServices::Fileable
- Defined in:
- lib/rails_services/fileable.rb
Overview
handles creating files and directories
Instance Method Summary collapse
-
#form_object_file ⇒ Object
forms.
- #form_spec_file ⇒ Object
- #form_unit_file ⇒ Object
- #object_directory ⇒ Object
-
#service_object_file ⇒ Object
services.
- #service_spec_file ⇒ Object
- #service_unit_file ⇒ Object
Instance Method Details
#form_object_file ⇒ Object
forms
25 26 27 |
# File 'lib/rails_services/fileable.rb', line 25 def form_object_file "#{object_name.underscore}_form.rb" end |
#form_spec_file ⇒ Object
29 30 31 |
# File 'lib/rails_services/fileable.rb', line 29 def form_spec_file "#{object_name.underscore}_form_spec.rb" end |
#form_unit_file ⇒ Object
33 34 35 |
# File 'lib/rails_services/fileable.rb', line 33 def form_unit_file "#{object_name.underscore}_form_test.rb" end |
#object_directory ⇒ Object
5 6 7 8 9 |
# File 'lib/rails_services/fileable.rb', line 5 def object_directory file_path = parent_name.pluralize.underscore.to_s file_path += "/#{['sub_folder'].underscore}" if ['sub_folder'].present? file_path end |
#service_object_file ⇒ Object
services
12 13 14 |
# File 'lib/rails_services/fileable.rb', line 12 def service_object_file "#{object_name.underscore}.rb" end |
#service_spec_file ⇒ Object
16 17 18 |
# File 'lib/rails_services/fileable.rb', line 16 def service_spec_file "#{object_name.underscore}_spec.rb" end |
#service_unit_file ⇒ Object
20 21 22 |
# File 'lib/rails_services/fileable.rb', line 20 def service_unit_file "#{object_name.underscore}_test.rb" end |