Class: Hiera::Backend::Eyaml::Parser::EncHieraTokenType

Inherits:
EncTokenType show all
Defined in:
lib/hiera/backend/eyaml/parser/encrypted_tokens.rb

Instance Attribute Summary

Attributes inherited from TokenType

#regex

Instance Method Summary collapse

Methods inherited from EncTokenType

#create_enc_token

Constructor Details

#initializeEncHieraTokenType

Returns a new instance of EncHieraTokenType.



110
111
112
113
# File 'lib/hiera/backend/eyaml/parser/encrypted_tokens.rb', line 110

def initialize
  @regex = %r{ENC\[(\w+,)?([a-zA-Z0-9+/ =\n]+?)\]}
  @string_token_type = EncStringTokenType.new
end

Instance Method Details

#create_token(string) ⇒ Object



115
116
117
# File 'lib/hiera/backend/eyaml/parser/encrypted_tokens.rb', line 115

def create_token(string)
  @string_token_type.create_token(string.gsub(/\s/, ''))
end