Class: Xing::CLI::Templaters::Templater
- Inherits:
-
Object
- Object
- Xing::CLI::Templaters::Templater
- Includes:
- Architecture
- Defined in:
- lib/xing/cli/templaters.rb
Direct Known Subclasses
CodeOfConductTemplater, ControlFilesTemplater, DatabaseYmlTemplater, DocFilesTemplater, SecretsYmlTemplater
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#guard ⇒ Object
readonly
Returns the value of attribute guard.
-
#target_name ⇒ Object
readonly
Returns the value of attribute target_name.
Instance Method Summary collapse
-
#initialize(target_name, context, guard = false) ⇒ Templater
constructor
A new instance of Templater.
- #template ⇒ Object
Constructor Details
#initialize(target_name, context, guard = false) ⇒ Templater
Returns a new instance of Templater.
9 10 11 12 13 |
# File 'lib/xing/cli/templaters.rb', line 9 def initialize(target_name, context, guard = false) @target_name = target_name @context = context @guard = guard end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
15 16 17 |
# File 'lib/xing/cli/templaters.rb', line 15 def context @context end |
#guard ⇒ Object (readonly)
Returns the value of attribute guard.
15 16 17 |
# File 'lib/xing/cli/templaters.rb', line 15 def guard @guard end |
#target_name ⇒ Object (readonly)
Returns the value of attribute target_name.
15 16 17 |
# File 'lib/xing/cli/templaters.rb', line 15 def target_name @target_name end |
Instance Method Details
#template ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/xing/cli/templaters.rb', line 17 def template if !guard architecture source: File.('../../../../default_configuration/templates/', __FILE__), destination: target_name do |arc| template_files(arc) end end end |