Exception: Ifconf::MalformedBlockError

Inherits:
Error
  • Object
show all
Defined in:
lib/ifconf/errors.rb

Overview

Raised when a raw ifconfig text block cannot be parsed into a valid interface.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, raw_text: nil, line_number: nil) ⇒ MalformedBlockError

Returns a new instance of MalformedBlockError.



8
9
10
11
12
# File 'lib/ifconf/errors.rb', line 8

def initialize(message, raw_text: nil, line_number: nil)
  @raw_text = raw_text
  @line_number = line_number
  super(message)
end

Instance Attribute Details

#line_numberObject (readonly)

Returns the value of attribute line_number.



6
7
8
# File 'lib/ifconf/errors.rb', line 6

def line_number
  @line_number
end

#raw_textObject (readonly)

Returns the value of attribute raw_text.



6
7
8
# File 'lib/ifconf/errors.rb', line 6

def raw_text
  @raw_text
end