Class: Trokko::Scaffolders::Entrypoint
- Inherits:
-
Object
- Object
- Trokko::Scaffolders::Entrypoint
- Defined in:
- lib/trokko/scaffolders/entrypoint.rb
Overview
Generating entrypoint.sh file according to configurations
Instance Attribute Summary collapse
-
#thor ⇒ Object
readonly
Returns the value of attribute thor.
Instance Method Summary collapse
- #generate ⇒ Object
-
#initialize(thor:) ⇒ Entrypoint
constructor
A new instance of Entrypoint.
Constructor Details
#initialize(thor:) ⇒ Entrypoint
Returns a new instance of Entrypoint.
9 10 11 |
# File 'lib/trokko/scaffolders/entrypoint.rb', line 9 def initialize(thor:) @thor = thor end |
Instance Attribute Details
#thor ⇒ Object (readonly)
Returns the value of attribute thor.
7 8 9 |
# File 'lib/trokko/scaffolders/entrypoint.rb', line 7 def thor @thor end |
Instance Method Details
#generate ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/trokko/scaffolders/entrypoint.rb', line 13 def generate thor.template( 'templates/entrypoint.sh.erb', "#{thor.name}/entrypoint.sh", force: true, context: binding ) end |