Sha256: 1c8aec3eccb80d0587f9711fb78e45b74041cc10f2a5793b12e3803054d6bdea

Contents?: true

Size: 507 Bytes

Versions: 13

Compression:

Stored size: 507 Bytes

Contents

# frozen_string_literal: true

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

module RubyGitCrypt
  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

13 entries across 13 versions & 1 rubygems

Version Path
ruby_git_crypt-0.2.0.pre.2 lib/ruby_git_crypt/options/types.rb
ruby_git_crypt-0.2.0.pre.1 lib/ruby_git_crypt/options/types.rb
ruby_git_crypt-0.1.0 lib/ruby_git_crypt/options/types.rb
ruby_git_crypt-0.1.0.pre.10 lib/ruby_git_crypt/options/types.rb
ruby_git_crypt-0.1.0.pre.9 lib/ruby_git_crypt/options/types.rb
ruby_git_crypt-0.1.0.pre.8 lib/ruby_git_crypt/options/types.rb
ruby_git_crypt-0.1.0.pre.7 lib/ruby_git_crypt/options/types.rb
ruby_git_crypt-0.1.0.pre.6 lib/ruby_git_crypt/options/types.rb
ruby_git_crypt-0.1.0.pre.5 lib/ruby_git_crypt/options/types.rb
ruby_git_crypt-0.1.0.pre.4 lib/ruby_git_crypt/options/types.rb
ruby_git_crypt-0.1.0.pre.3 lib/ruby_git_crypt/options/types.rb
ruby_git_crypt-0.1.0.pre.2 lib/ruby_git_crypt/options/types.rb
ruby_git_crypt-0.1.0.pre.1 lib/ruby_git_crypt/options/types.rb