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

Inherits:
Aranha::Parsers::Base
  • Object
show all
Defined in:
lib/avmtrf1/openvpn/config/parser.rb,
lib/avmtrf1/openvpn/config/parser/tag.rb,
lib/avmtrf1/openvpn/config/parser/line.rb,
lib/avmtrf1/openvpn/config/parser/simple.rb,
lib/avmtrf1/openvpn/config/parser/builder.rb

Defined Under Namespace

Classes: Builder, Line, Simple, Tag

Instance Method Summary collapse

Instance Method Details

#dataObject


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

def data
  builder = ::Avmtrf1::Openvpn::Config::Parser::Builder.new
  content.each_line { |line| builder.add_line(line) }
  { simple: builder.simple.map(&:data), tags: builder.tags.map(&:data) }
end