Class: Hiera::Backend::Eyaml::Parser::EncStringTokenType
- Inherits:
-
EncTokenType
- Object
- TokenType
- EncTokenType
- Hiera::Backend::Eyaml::Parser::EncStringTokenType
- Defined in:
- lib/hiera/backend/eyaml/parser/encrypted_tokens.rb
Instance Attribute Summary
Attributes inherited from TokenType
Instance Method Summary collapse
- #create_token(string) ⇒ Object
-
#initialize ⇒ EncStringTokenType
constructor
A new instance of EncStringTokenType.
Methods inherited from EncTokenType
Constructor Details
#initialize ⇒ EncStringTokenType
Returns a new instance of EncStringTokenType.
120 121 122 |
# File 'lib/hiera/backend/eyaml/parser/encrypted_tokens.rb', line 120 def initialize @regex = /ENC\[(\w+,)?([a-zA-Z0-9\+\/=]+?)\]/ end |
Instance Method Details
#create_token(string) ⇒ Object
123 124 125 126 |
# File 'lib/hiera/backend/eyaml/parser/encrypted_tokens.rb', line 123 def create_token(string) md = @regex.match(string) self.create_enc_token(string, :string, md[1], md[2]) end |