Exception: NxtSchema::Errors::Invalid

Inherits:
NxtSchema::Error show all
Defined in:
lib/nxt_schema/errors/invalid.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(node) ⇒ Invalid

Returns a new instance of Invalid.



4
5
6
7
# File 'lib/nxt_schema/errors/invalid.rb', line 4

def initialize(node)
  @node = node
  super(build_message)
end

Instance Attribute Details

#nodeObject (readonly)

Returns the value of attribute node.



9
10
11
# File 'lib/nxt_schema/errors/invalid.rb', line 9

def node
  @node
end

Instance Method Details

#build_messageObject



11
12
13
# File 'lib/nxt_schema/errors/invalid.rb', line 11

def build_message
  node.errors
end