Sha256: c6b41c4cb7878dd8d9ddf0f5981eb3a9d10df02036400b4e15c7a4665a91424e

Contents?: true

Size: 624 Bytes

Versions: 3

Compression:

Stored size: 624 Bytes

Contents

# frozen_string_literal: true

require_relative '../value_equality'

module RubyTerraform
  module Models
    class KnownValue
      include ValueEquality

      def initialize(value, sensitive: false)
        @value = value
        @sensitive = sensitive
      end

      attr_reader :value
      alias unbox value

      def known?
        true
      end

      def sensitive?
        @sensitive
      end

      def state
        [@value, @sensitive]
      end

      def inspect
        sensitive = sensitive? ? 'sensitive' : 'non-sensitive'
        "#{@value.inspect} (known, #{sensitive})"
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ruby-terraform-1.7.0.pre.6 lib/ruby_terraform/models/known_value.rb
ruby-terraform-1.7.0.pre.5 lib/ruby_terraform/models/known_value.rb
ruby-terraform-1.7.0.pre.4 lib/ruby_terraform/models/known_value.rb