Class: Hiera::Backend::Eyaml::Parser::DecBlockTokenType
- 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 ⇒ DecBlockTokenType
constructor
A new instance of DecBlockTokenType.
Constructor Details
#initialize ⇒ DecBlockTokenType
Returns a new instance of DecBlockTokenType.
122 123 124 |
# File 'lib/hiera/backend/eyaml/parser/encrypted_tokens.rb', line 122 def initialize @regex = />\n(\s*)DEC(\(\d+\))?::(\w+)\[(.+?)\]\!/ end |
Instance Method Details
#create_token(string) ⇒ Object
125 126 127 128 129 |
# File 'lib/hiera/backend/eyaml/parser/encrypted_tokens.rb', line 125 def create_token(string) md = @regex.match(string) EncToken.decrypted_value(:block, md[4], md[3], string, md[2], md[1]) EncToken.decrypted_value(:block, md[4], md[3], string, md[2], md[1]) end |