Class: Avromatic::Model::Configurable::FieldReference
- Inherits:
-
Object
- Object
- Avromatic::Model::Configurable::FieldReference
- Defined in:
- lib/avromatic/model/configurable.rb
Overview
Wraps a reference to a field so we can access both the string and symbolized versions of the name without repeated memory allocations.
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#name_sym ⇒ Object
readonly
Returns the value of attribute name_sym.
Instance Method Summary collapse
-
#initialize(name) ⇒ FieldReference
constructor
A new instance of FieldReference.
Constructor Details
#initialize(name) ⇒ FieldReference
Returns a new instance of FieldReference.
16 17 18 19 |
# File 'lib/avromatic/model/configurable.rb', line 16 def initialize(name) @name = -name @name_sym = name.to_sym end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
14 15 16 |
# File 'lib/avromatic/model/configurable.rb', line 14 def name @name end |
#name_sym ⇒ Object (readonly)
Returns the value of attribute name_sym.
14 15 16 |
# File 'lib/avromatic/model/configurable.rb', line 14 def name_sym @name_sym end |