Class: Belt::Holster
- Inherits:
-
Object
- Object
- Belt::Holster
- Defined in:
- lib/belt/holster.rb
Class Attribute Summary collapse
-
.controllers_path ⇒ Object
Defaults follow Belt project structure conventions.
-
.gem_root ⇒ Object
Convention: gem root is two levels up from the holster file.
- .models_path ⇒ Object
- .routes_path ⇒ Object
- .schema_path ⇒ Object
Class Method Summary collapse
Class Attribute Details
.controllers_path ⇒ Object
Defaults follow Belt project structure conventions
19 20 21 |
# File 'lib/belt/holster.rb', line 19 def controllers_path @controllers_path || File.join(gem_root, 'lambda', 'controllers') end |
.gem_root ⇒ Object
Convention: gem root is two levels up from the holster file
12 13 14 |
# File 'lib/belt/holster.rb', line 12 def gem_root @gem_root ||= File.('../..', caller_locations(1, 1).first.path) end |
.models_path ⇒ Object
23 24 25 |
# File 'lib/belt/holster.rb', line 23 def models_path @models_path || File.join(gem_root, 'lambda', 'models') end |
.routes_path ⇒ Object
27 28 29 |
# File 'lib/belt/holster.rb', line 27 def routes_path @routes_path || File.join(gem_root, 'infrastructure', 'routes.tf.rb') end |
.schema_path ⇒ Object
31 32 33 |
# File 'lib/belt/holster.rb', line 31 def schema_path @schema_path || File.join(gem_root, 'infrastructure', 'schema.tf.rb') end |