Exception: Snapsync::Btrfs::Error

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/snapsync/btrfs.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(error_lines = Array.new) ⇒ Error

Returns a new instance of Error.



5
6
7
# File 'lib/snapsync/btrfs.rb', line 5

def initialize(error_lines = Array.new)
    @error_lines = error_lines
end

Instance Attribute Details

#error_linesObject (readonly)

Returns the value of attribute error_lines.



4
5
6
# File 'lib/snapsync/btrfs.rb', line 4

def error_lines
  @error_lines
end

Instance Method Details

#pretty_print(pp) ⇒ Object



9
10
11
12
13
14
15
16
17
# File 'lib/snapsync/btrfs.rb', line 9

def pretty_print(pp)
    pp.text message
    pp.nest(2) do
        error_lines.each do |l|
            pp.breakable
            pp.text l.chomp
        end
    end
end