Class: Odin::Transform::OdinDirective
- Inherits:
-
Object
- Object
- Odin::Transform::OdinDirective
- Defined in:
- lib/odin/transform/transform_types.rb
Overview
Directive attached to a field mapping
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(name, value = nil) ⇒ OdinDirective
constructor
A new instance of OdinDirective.
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
#name ⇒ Object (readonly)
Returns the value of attribute name.
229 230 231 |
# File 'lib/odin/transform/transform_types.rb', line 229 def name @name end |
#value ⇒ Object (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 |