Sha256: 69f7cb9947ce2da357840142e9db7fb44ef2131fa9d553e42200b23cb6bf1a78

Contents?: true

Size: 538 Bytes

Versions: 4

Compression:

Stored size: 538 Bytes

Contents

# frozen_string_literal: true

require_relative 'types/base'
require_relative 'types/standard'
require_relative 'types/flag'

module RubyTerraform
  module Options
    module Types
      def self.standard(name, value, **opts)
        Standard.new(name, value, **opts)
      end

      def self.flag(name, value)
        Flag.new(name, value)
      end

      def self.resolve(type)
        case type
        when :standard then Types::Standard
        when :flag then Types::Flag
        else type
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ruby-terraform-0.65.0.pre.15 lib/ruby_terraform/options/types.rb
ruby-terraform-0.65.0.pre.14 lib/ruby_terraform/options/types.rb
ruby-terraform-0.65.0.pre.13 lib/ruby_terraform/options/types.rb
ruby-terraform-0.65.0.pre.12 lib/ruby_terraform/options/types.rb