Class: Wire::VerificationError

Inherits:
Object
  • Object
show all
Defined in:
lib/wire/model/verification.rb

Overview

raised in case of model elements not running or in other verification states

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, element_type, element_name, element) ⇒ VerificationError

initalizes the verification error params:

message

verification (error) message

element_type

element type as string (i.e. ‘network’)

element_name

name of element within model

element

reference to model element



25
26
27
28
29
30
# File 'lib/wire/model/verification.rb', line 25

def initialize(message, element_type, element_name, element)
  @message = message
  @element_type = element_type
  @element_name = element_name
  @element = element
end

Instance Attribute Details

#elementObject

message

verification (error) message

element_type

element type as string (i.e. ‘network’)

element_name

name of element within model

element

reference to model element



17
18
19
# File 'lib/wire/model/verification.rb', line 17

def element
  @element
end

#element_nameObject

message

verification (error) message

element_type

element type as string (i.e. ‘network’)

element_name

name of element within model

element

reference to model element



17
18
19
# File 'lib/wire/model/verification.rb', line 17

def element_name
  @element_name
end

#element_typeObject

message

verification (error) message

element_type

element type as string (i.e. ‘network’)

element_name

name of element within model

element

reference to model element



17
18
19
# File 'lib/wire/model/verification.rb', line 17

def element_type
  @element_type
end

#messageObject

message

verification (error) message

element_type

element type as string (i.e. ‘network’)

element_name

name of element within model

element

reference to model element



17
18
19
# File 'lib/wire/model/verification.rb', line 17

def message
  @message
end

Instance Method Details

#to_sObject

string representation



33
34
35
# File 'lib/wire/model/verification.rb', line 33

def to_s
  "VerificationError on #{@element_type} #{@element_name}: #{@message}"
end