Class: Vedeu::MenuParser

Inherits:
Object
  • Object
show all
Defined in:
lib/vedeu/parsing/menu_parser.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(output = {}) ⇒ MenuParser

Returns a new instance of MenuParser.



12
13
14
# File 'lib/vedeu/parsing/menu_parser.rb', line 12

def initialize(output = {})
  @output = output
end

Class Method Details

.parse(output = {}) ⇒ Hash

Convert a Vedeu::Menu into an interface view.

Parameters:

  • output (Hash) (defaults to: {})

    a key/value pair.

Returns:

  • (Hash)


8
9
10
# File 'lib/vedeu/parsing/menu_parser.rb', line 8

def self.parse(output = {})
  new(output).parse
end

Instance Method Details

#parseObject



16
17
18
# File 'lib/vedeu/parsing/menu_parser.rb', line 16

def parse
  { interfaces: interface }
end