Exception: SuperDiff::Errors::NoDiffFormatterAvailableError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/super_diff/errors/no_diff_formatter_available_error.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeNoDiffFormatterAvailableError

Returns a new instance of NoDiffFormatterAvailableError.



13
14
15
16
17
18
# File 'lib/super_diff/errors/no_diff_formatter_available_error.rb', line 13

def initialize
  super(<<-MESSAGE)
There is no diff formatter available to handle an operation tree object of
#{operation_tree.class}.
  MESSAGE
end

Instance Attribute Details

#operation_treeObject

Returns the value of attribute operation_tree.



11
12
13
# File 'lib/super_diff/errors/no_diff_formatter_available_error.rb', line 11

def operation_tree
  @operation_tree
end

Class Method Details

.create(operation_tree) ⇒ Object



4
5
6
7
8
9
# File 'lib/super_diff/errors/no_diff_formatter_available_error.rb', line 4

def self.create(operation_tree)
  allocate.tap do |error|
    error.operation_tree = operation_tree
    error.__send__(:initialize)
  end
end