Exception: SuperDiff::Core::NoOperationTreeAvailableError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/super_diff/core/no_operation_tree_available_error.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeNoOperationTreeAvailableError

Returns a new instance of NoOperationTreeAvailableError.



15
16
17
18
19
# File 'lib/super_diff/core/no_operation_tree_available_error.rb', line 15

def initialize
  super(<<~MESSAGE)
    There is no operation tree available to handle a "value" of type #{value.class}.
  MESSAGE
end

Instance Attribute Details

#valueObject

Returns the value of attribute value.



13
14
15
# File 'lib/super_diff/core/no_operation_tree_available_error.rb', line 13

def value
  @value
end

Class Method Details

.create(value) ⇒ Object



6
7
8
9
10
11
# File 'lib/super_diff/core/no_operation_tree_available_error.rb', line 6

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