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.
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
#name ⇒ Object (readonly)
Returns the value of attribute name.
244 245 246 |
# File 'lib/odin/transform/transform_types.rb', line 244 def name @name end |
#value ⇒ Object (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 |