Class: OCI::Auth::Signers::RptPathProvider::RptPathProvider
- Inherits:
-
Object
- Object
- OCI::Auth::Signers::RptPathProvider::RptPathProvider
- Defined in:
- lib/oci/auth/signers/resource_principal_token_path_provider/rpt_path_provider.rb
Overview
base class
Direct Known Subclasses
DefaultRptPathProvider, EnvRptPathProvider, ImdsRptPathProvider, StringRptPathProvider
Instance Method Summary collapse
-
#initialize(template) ⇒ RptPathProvider
constructor
A new instance of RptPathProvider.
- #replacement_dict ⇒ Object
- #token_path ⇒ Object
Constructor Details
#initialize(template) ⇒ RptPathProvider
Returns a new instance of RptPathProvider.
14 15 16 |
# File 'lib/oci/auth/signers/resource_principal_token_path_provider/rpt_path_provider.rb', line 14 def initialize(template) @template = template end |
Instance Method Details
#replacement_dict ⇒ Object
29 30 31 |
# File 'lib/oci/auth/signers/resource_principal_token_path_provider/rpt_path_provider.rb', line 29 def replacement_dict nil end |
#token_path ⇒ Object
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/oci/auth/signers/resource_principal_token_path_provider/rpt_path_provider.rb', line 18 def token_path path = @template unless replacement_dict.nil? path = @template replacement_dict.each do |key, val| path = path.gsub("{#{key}}", val) end end path end |