Class: SetupScriptGenerator::Cli::Provision
- Inherits:
-
Object
- Object
- SetupScriptGenerator::Cli::Provision
- Defined in:
- lib/setup_script_generator/cli.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #code ⇒ Object
-
#initialize(name, provisions_directory) ⇒ Provision
constructor
A new instance of Provision.
- #valid? ⇒ Boolean
Constructor Details
#initialize(name, provisions_directory) ⇒ Provision
Returns a new instance of Provision.
193 194 195 196 |
# File 'lib/setup_script_generator/cli.rb', line 193 def initialize(name, provisions_directory) @name = name @provisions_directory = provisions_directory end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
191 192 193 |
# File 'lib/setup_script_generator/cli.rb', line 191 def name @name end |
Instance Method Details
#code ⇒ Object
198 199 200 |
# File 'lib/setup_script_generator/cli.rb', line 198 def code @_code ||= file.read end |
#valid? ⇒ Boolean
202 203 204 |
# File 'lib/setup_script_generator/cli.rb', line 202 def valid? file.exist? end |