Module: Collection::Controls::Array::RandomMemberClass
- Defined in:
- lib/collection/controls/array.rb
Class Method Summary collapse
Class Method Details
.example(homogeneous_classes: nil) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/collection/controls/array.rb', line 13 def self.example(homogeneous_classes: nil) homogeneous_classes ||= false if homogeneous_classes cls_1 = member_class cls_2 = cls_1 else cls_1 = member_class cls_2 = member_class end [cls_1.new, cls_2.new] end |