Class: Attrio::Builders::ReaderBuilder
- Inherits:
-
AccessorBuilder
- Object
- AccessorBuilder
- Attrio::Builders::ReaderBuilder
- Defined in:
- lib/attrio/builders/reader_builder.rb
Class Method Summary collapse
Methods inherited from AccessorBuilder
Class Method Details
.accessor ⇒ Object
8 9 10 |
# File 'lib/attrio/builders/reader_builder.rb', line 8 def self.accessor :reader end |
.define_accessor(klass, type, options) ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/attrio/builders/reader_builder.rb', line 12 def self.define_accessor(klass, type, ) unless klass.method_defined?([:method_name]) klass.send :define_method, [:method_name] do self.instance_variable_get([:instance_variable_name]) end klass.send [:method_visibility], [:method_name] end end |