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.



246
247
248
249
# File 'lib/odin/transform/transform_types.rb', line 246

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

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



244
245
246
# File 'lib/odin/transform/transform_types.rb', line 244

def name
  @name
end

#valueObject (readonly)

Returns the value of attribute value.



244
245
246
# File 'lib/odin/transform/transform_types.rb', line 244

def value
  @value
end

Instance Method Details

#==(other) ⇒ Object



251
252
253
# File 'lib/odin/transform/transform_types.rb', line 251

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