Sha256: 86de6aef4eb1fcea505de15b896d1599aa0c459497dbaecda7c5b0eef34efe4f
Contents?: true
Size: 1017 Bytes
Versions: 1
Compression:
Stored size: 1017 Bytes
Contents
# typed: ignore # frozen_string_literal: true module EML module UK class << self extend T::Sig sig { void } def configure yield config end sig { returns(Config) } def config @config ||= T.let(Config.new, Config) end end class Config < ::EML::Config extend T::Sig sig { returns(String) } attr_accessor :username sig { returns(String) } attr_accessor :password sig { returns(String) } attr_accessor :merchant_group sig { returns(String) } attr_accessor :program sig { returns(String) } attr_accessor :search_parameter private sig { params(param: Symbol).void } def require_error(param) raise( ArgumentError, "#{param} is required but hasn't been set.\n" \ "EML::UK::Config.configuration do |config|\n" + %( config.#{param} = "value") + "\n" \ "end" ) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
eml-1.0.0 | lib/eml/uk/config.rb |