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.
125 126 127 |
# File 'lib/hiera/backend/eyaml/parser/encrypted_tokens.rb', line 125 def initialize @regex = />\n(\s*)DEC(\(\d+\))?::(\w+)\[(.+?)\]\!/m end |
Instance Method Details
#create_token(string) ⇒ Object
128 129 130 131 132 |
# File 'lib/hiera/backend/eyaml/parser/encrypted_tokens.rb', line 128 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 |