Class: Odin::Transform::OdinDirective

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

Overview

Directive attached to a field mapping

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, value = nil) ⇒ OdinDirective

Returns a new instance of OdinDirective.



231
232
233
234
# File 'lib/odin/transform/transform_types.rb', line 231

def initialize(name, value = nil)
  @name = name
  @value = value
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



229
230
231
# File 'lib/odin/transform/transform_types.rb', line 229

def name
  @name
end

#valueObject (readonly)

Returns the value of attribute value.



229
230
231
# File 'lib/odin/transform/transform_types.rb', line 229

def value
  @value
end

Instance Method Details

#==(other) ⇒ Object



236
237
238
# File 'lib/odin/transform/transform_types.rb', line 236

def ==(other)
  other.is_a?(OdinDirective) && name == other.name && value == other.value
end