Class: ActiveModel::AttributeSet::Builder
Do not use. This class is for internal use only.
Relationships & Source Files | |
Inherits: | Object |
Defined in: | activemodel/lib/active_model/attribute_set/builder.rb |
Class Method Summary
- .new(types, default_attributes = {}) ⇒ Builder constructor
Instance Attribute Summary
- #default_attributes readonly
- #types readonly
Instance Method Summary
Constructor Details
.new(types, default_attributes = {}) ⇒ Builder
# File 'activemodel/lib/active_model/attribute_set/builder.rb', line 10
def initialize(types, default_attributes = {}) @types = types @default_attributes = default_attributes end
Instance Attribute Details
#default_attributes (readonly)
[ GitHub ]# File 'activemodel/lib/active_model/attribute_set/builder.rb', line 8
attr_reader :types, :default_attributes
#types (readonly)
[ GitHub ]# File 'activemodel/lib/active_model/attribute_set/builder.rb', line 8
attr_reader :types, :default_attributes
Instance Method Details
#build_from_database(values = {}, additional_types = {})
[ GitHub ]# File 'activemodel/lib/active_model/attribute_set/builder.rb', line 15
def build_from_database(values = {}, additional_types = {}) LazyAttributeSet.new(values, types, additional_types, default_attributes) end