Refactor Association/Reflection block value reading

This commit is contained in:
Benjamin Fleischer
2015-12-03 10:53:43 -06:00
parent cd736e0adf
commit c4feccfd10
3 changed files with 35 additions and 24 deletions

View File

@@ -3,10 +3,12 @@ module ActiveModel
module Attributes
class Attribute
delegate :call, to: :reader
attr_reader :name, :reader
def initialize(name)
@name = name
@reader = nil
@reader = :no_reader
end
def self.build(name, block)