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.



25
26
27
28
# File 'lib/odin/transform/transform_engine.rb', line 25

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

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



22
23
24
# File 'lib/odin/transform/transform_engine.rb', line 22

def code
  @code
end

#fieldObject

Returns the value of attribute field.



23
24
25
# File 'lib/odin/transform/transform_engine.rb', line 23

def field
  @field
end

#messageObject (readonly)

Returns the value of attribute message.



22
23
24
# File 'lib/odin/transform/transform_engine.rb', line 22

def message
  @message
end

#segmentObject

Returns the value of attribute segment.



23
24
25
# File 'lib/odin/transform/transform_engine.rb', line 23

def segment
  @segment
end

Instance Method Details

#to_sObject



30
31
32
# File 'lib/odin/transform/transform_engine.rb', line 30

def to_s
  @message
end