Class: IPXACT::Tools::ValidationMessage

Inherits:
Struct
  • Object
show all
Defined in:
lib/ipxact_tools.rb

Overview

A simple structure for handling diagnosis messages.

Direct Known Subclasses

ValidationError, ValidationWarning

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ ValidationMessage

Returns a new instance of ValidationMessage.



52
53
54
55
56
# File 'lib/ipxact_tools.rb', line 52

def initialize(hash)
  entry = hash.entries[0]
  self.reason = entry[0]
  self.cause_element = entry[1]
end

Instance Attribute Details

#cause_elementObject

Returns the value of attribute cause_element

Returns:

  • (Object)

    the current value of cause_element



51
52
53
# File 'lib/ipxact_tools.rb', line 51

def cause_element
  @cause_element
end

#reasonObject

Returns the value of attribute reason

Returns:

  • (Object)

    the current value of reason



51
52
53
# File 'lib/ipxact_tools.rb', line 51

def reason
  @reason
end