Class: Terraspace::CLI::Fmt
- Inherits:
-
Object
- Object
- Terraspace::CLI::Fmt
- Includes:
- Concerns::SourceDirs, Util::Logging
- Defined in:
- lib/terraspace/cli/fmt.rb,
lib/terraspace/cli/fmt/runner.rb
Defined Under Namespace
Classes: Runner
Instance Method Summary collapse
- #format(dir) ⇒ Object
-
#initialize(options = {}) ⇒ Fmt
constructor
A new instance of Fmt.
- #run ⇒ Object
Methods included from Util::Logging
Methods included from Concerns::SourceDirs
#app_source_dirs, #source_dirs
Constructor Details
#initialize(options = {}) ⇒ Fmt
Returns a new instance of Fmt.
6 7 8 9 |
# File 'lib/terraspace/cli/fmt.rb', line 6 def initialize(={}) @options = @mod_name = [:mod] end |
Instance Method Details
#format(dir) ⇒ Object
18 19 20 |
# File 'lib/terraspace/cli/fmt.rb', line 18 def format(dir) Runner.new(dir).format! end |
#run ⇒ Object
11 12 13 14 15 16 |
# File 'lib/terraspace/cli/fmt.rb', line 11 def run logger.info "Formating terraform files" dirs.each do |dir| format(dir) end end |