Class: LightweightAttributes::AttributeSet::Builder
- Inherits:
-
Object
- Object
- LightweightAttributes::AttributeSet::Builder
- Defined in:
- lib/lightweight_attributes/attribute_set/builder.rb
Instance Attribute Summary collapse
-
#default_attributes ⇒ Object
readonly
Returns the value of attribute default_attributes.
-
#types ⇒ Object
readonly
Returns the value of attribute types.
Instance Method Summary collapse
- #build_from_database(values = {}, _additional_types = {}) ⇒ Object
-
#initialize(types, default_attributes = {}) ⇒ Builder
constructor
A new instance of Builder.
Constructor Details
#initialize(types, default_attributes = {}) ⇒ Builder
Returns a new instance of Builder.
8 9 10 11 |
# File 'lib/lightweight_attributes/attribute_set/builder.rb', line 8 def initialize(types, default_attributes = {}) @types = types @default_attributes = default_attributes end |
Instance Attribute Details
#default_attributes ⇒ Object (readonly)
Returns the value of attribute default_attributes.
6 7 8 |
# File 'lib/lightweight_attributes/attribute_set/builder.rb', line 6 def default_attributes @default_attributes end |
#types ⇒ Object (readonly)
Returns the value of attribute types.
6 7 8 |
# File 'lib/lightweight_attributes/attribute_set/builder.rb', line 6 def types @types end |
Instance Method Details
#build_from_database(values = {}, _additional_types = {}) ⇒ Object
13 14 15 |
# File 'lib/lightweight_attributes/attribute_set/builder.rb', line 13 def build_from_database(values = {}, _additional_types = {}) LightweightAttributes::AttributeSet.new values end |