Class: RubyTerraform::Options::Values::Boolean

Inherits:
Base
  • Object
show all
Defined in:
lib/ruby_terraform/options/values/boolean.rb

Instance Method Summary collapse

Constructor Details

This class inherits a constructor from RubyTerraform::Options::Values::Base

Instance Method Details

#renderObject



17
18
19
# File 'lib/ruby_terraform/options/values/boolean.rb', line 17

def render
  resolve&.to_s
end

#resolveObject



9
10
11
12
13
14
15
# File 'lib/ruby_terraform/options/values/boolean.rb', line 9

def resolve
  return nil if @value.nil?
  return @value if a_boolean?(@value)
  return true if true_as_string?(@value)

  false
end