Method: Virtus::AttributeSet#define_reader_method
- Defined in:
- lib/virtus/attribute_set.rb
#define_reader_method(attribute, method_name, visibility) ⇒ undefined
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Defines an attribute reader method
131 132 133 134 |
# File 'lib/virtus/attribute_set.rb', line 131 def define_reader_method(attribute, method_name, visibility) define_method(method_name) { attribute.get(self) } send(visibility, method_name) end |