Exception: Isomorphic::InvalidNodeObject

Inherits:
NodeError show all
Defined in:
lib/isomorphic/node.rb

Overview

Raised when an object is not an instance of a class.

Instance Attribute Summary collapse

Attributes inherited from IsomorphicError

#base

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, klass, object) ⇒ InvalidNodeObject

Default constructor.

Parameters:

  • message (#to_s) (defaults to: nil)

    the message

  • klass (Clsas)

    the class

  • object (Object)

    the object



55
56
57
58
59
# File 'lib/isomorphic/node.rb', line 55

def initialize(message = nil, klass, object)
  super(message)

  @klass, @object = klass, object
end

Instance Attribute Details

#klassClass (readonly)

Returns the class.

Returns:

  • (Class)

    the class



48
49
50
# File 'lib/isomorphic/node.rb', line 48

def klass
  @klass
end

#objectObject (readonly)

Returns the value of attribute object.



48
# File 'lib/isomorphic/node.rb', line 48

attr_reader :klass, :object