Sha256: 5eed60a1cef1d13d05d689ab6e9a0fdeb1bd8b68231861ebc33de0b20ba6d4f6

Contents?: true

Size: 353 Bytes

Versions: 10

Compression:

Stored size: 353 Bytes

Contents

# frozen_string_literal: true

module AppStoreConnect
  module Type
    class Enum
      attr_reader :value

      def initialize(value:)
        @value = value
      end

      def self.const_missing(const)
        return const_set(const, new(value: const.to_s)) if const.to_s.in?(const_get('VALUES'))

        super(const)
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
app_store_connect-0.12.2 lib/app_store_connect/type/enum.rb
app_store_connect-0.12.1 lib/app_store_connect/type/enum.rb
app_store_connect-0.12.0 lib/app_store_connect/type/enum.rb
app_store_connect-0.11.0 lib/app_store_connect/type/enum.rb
app_store_connect-0.10.0 lib/app_store_connect/type/enum.rb
app_store_connect-0.9.0 lib/app_store_connect/type/enum.rb
app_store_connect-0.8.0 lib/app_store_connect/type/enum.rb
app_store_connect-0.7.0 lib/app_store_connect/type/enum.rb
app_store_connect-0.6.0 lib/app_store_connect/type/enum.rb
app_store_connect-0.5.0 lib/app_store_connect/type/enum.rb