Class: Relaxo::Model::Properties::ArrayOf
- Inherits:
-
Object
- Object
- Relaxo::Model::Properties::ArrayOf
- Defined in:
- lib/relaxo/model/properties/composite.rb
Class Method Summary collapse
Instance Method Summary collapse
- #convert_from_primative(database, value) ⇒ Object
- #convert_to_primative(value) ⇒ Object
-
#initialize(klass) ⇒ ArrayOf
constructor
A new instance of ArrayOf.
Constructor Details
Class Method Details
.[](klass) ⇒ Object
122 123 124 |
# File 'lib/relaxo/model/properties/composite.rb', line 122 def self.[] klass self.new(klass) end |
Instance Method Details
#convert_from_primative(database, value) ⇒ Object
136 137 138 139 140 |
# File 'lib/relaxo/model/properties/composite.rb', line 136 def convert_from_primative(database, value) value.collect do |item| @klass.convert_from_primative(database, item) end end |
#convert_to_primative(value) ⇒ Object
130 131 132 133 134 |
# File 'lib/relaxo/model/properties/composite.rb', line 130 def convert_to_primative(value) value.collect do |item| @klass.convert_to_primative(item) end end |