Sha256: 55b7ee00ab1b108ee46eeed12ccf40768e7b432ae50c996bc224b7d7193a2085

Contents?: true

Size: 675 Bytes

Versions: 12

Compression:

Stored size: 675 Bytes

Contents

module CandyCheck
  module AppStore
    # Configure the verifier
    class Config < Utils::Config
      # @return [Symbol] the used environment
      attr_reader :environment

      # Initializes a new configuration from a hash
      # @param attributes [Hash]
      # @example
      #   Config.new(
      #     environment: :production # or :sandbox
      #   )
      def initialize(attributes)
        super
      end

      # @return [Boolean] if it is production environment
      def production?
        environment == :production
      end

      private

      def validate!
        validates_inclusion(:environment, :production, :sandbox)
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
candy_check-0.5.0 lib/candy_check/app_store/config.rb
candy_check-0.4.0 lib/candy_check/app_store/config.rb
candy_check-0.3.0 lib/candy_check/app_store/config.rb
candy_check-0.2.1 lib/candy_check/app_store/config.rb
candy_check-0.2.0 lib/candy_check/app_store/config.rb
candy_check-0.1.2 lib/candy_check/app_store/config.rb
candy_check-0.1.1 lib/candy_check/app_store/config.rb
candy_check-0.1.0.pre lib/candy_check/app_store/config.rb
candy_check-0.0.5 lib/candy_check/app_store/config.rb
candy_check-0.0.3 lib/candy_check/app_store/config.rb
candy_check-0.0.2 lib/candy_check/app_store/config.rb
candy_check-0.0.1 lib/candy_check/app_store/config.rb