Class: Kitchen::Terraform::CommandFlag::Color
- Inherits:
-
Object
- Object
- Kitchen::Terraform::CommandFlag::Color
- Defined in:
- lib/kitchen/terraform/command_flag/color.rb
Overview
Color is the class of objects which control coloured output.
Instance Method Summary collapse
-
#initialize(enabled:) ⇒ Kitchen::Terraform::CommandFlag::Color
constructor
#initialize prepares a new instance of the class.
-
#to_s ⇒ String
The color flag.
Constructor Details
#initialize(enabled:) ⇒ Kitchen::Terraform::CommandFlag::Color
#initialize prepares a new instance of the class.
26 27 28 |
# File 'lib/kitchen/terraform/command_flag/color.rb', line 26 def initialize(enabled:) self.enabled = enabled end |
Instance Method Details
#to_s ⇒ String
Returns the color flag.
31 32 33 34 35 36 37 |
# File 'lib/kitchen/terraform/command_flag/color.rb', line 31 def to_s if enabled "" else "-no-color" end end |