Class: Avmtrf1::Openvpn::Config::Parser::Tag

Inherits:
Object
  • Object
show all
Defined in:
lib/avmtrf1/openvpn/config/parser/tag.rb

Instance Method Summary collapse

Instance Method Details

#add_line(text) ⇒ Object


14
15
16
# File 'lib/avmtrf1/openvpn/config/parser/tag.rb', line 14

def add_line(text)
  lines << text
end

#closeObject


26
27
28
# File 'lib/avmtrf1/openvpn/config/parser/tag.rb', line 26

def close
  @open = false
end

#dataObject


18
19
20
# File 'lib/avmtrf1/openvpn/config/parser/tag.rb', line 18

def data
  { name: name, content: lines.join("\n") }
end

#open?Boolean

Returns:

  • (Boolean)

22
23
24
# File 'lib/avmtrf1/openvpn/config/parser/tag.rb', line 22

def open?
  @open
end