Class: Hiera::Backend::Eyaml::Parser::Token

Inherits:
Object
  • Object
show all
Defined in:
lib/hiera/backend/eyaml/parser/token.rb

Direct Known Subclasses

EncToken, NonMatchToken

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(match) ⇒ Token

Returns a new instance of Token.



16
17
18
# File 'lib/hiera/backend/eyaml/parser/token.rb', line 16

def initialize(match)
  @match = match
end

Instance Attribute Details

#matchObject (readonly)

Returns the value of attribute match.



14
15
16
# File 'lib/hiera/backend/eyaml/parser/token.rb', line 14

def match
  @match
end

Instance Method Details

#to_decrypted(_args = {}) ⇒ Object



24
25
26
# File 'lib/hiera/backend/eyaml/parser/token.rb', line 24

def to_decrypted(_args = {})
  raise 'Abstract method called'
end

#to_encrypted(_args = {}) ⇒ Object



20
21
22
# File 'lib/hiera/backend/eyaml/parser/token.rb', line 20

def to_encrypted(_args = {})
  raise 'Abstract method called'
end

#to_plain_textObject



28
29
30
# File 'lib/hiera/backend/eyaml/parser/token.rb', line 28

def to_plain_text
  raise 'Abstract method called'
end

#to_sObject



32
33
34
# File 'lib/hiera/backend/eyaml/parser/token.rb', line 32

def to_s
  "#{self.class.name}:#{@match}"
end