Class: Odin::Transform::TransformEngine::TransformWarning

Inherits:
Object
  • Object
show all
Defined in:
lib/odin/transform/transform_engine.rb

Overview

A warning carrying a stable transform error code. Collected alongside string warnings; consumers that inspect codes read .code.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, code:) ⇒ TransformWarning

Returns a new instance of TransformWarning.



38
39
40
41
# File 'lib/odin/transform/transform_engine.rb', line 38

def initialize(message, code:)
  @message = message
  @code = code
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



35
36
37
# File 'lib/odin/transform/transform_engine.rb', line 35

def code
  @code
end

#fieldObject

Returns the value of attribute field.



36
37
38
# File 'lib/odin/transform/transform_engine.rb', line 36

def field
  @field
end

#messageObject (readonly)

Returns the value of attribute message.



35
36
37
# File 'lib/odin/transform/transform_engine.rb', line 35

def message
  @message
end

#segmentObject

Returns the value of attribute segment.



36
37
38
# File 'lib/odin/transform/transform_engine.rb', line 36

def segment
  @segment
end

Instance Method Details

#to_sObject



43
44
45
# File 'lib/odin/transform/transform_engine.rb', line 43

def to_s
  @message
end