Method: VirtualBox::Medium.populate_array_relationship
- Defined in:
- lib/virtualbox/medium.rb
.populate_array_relationship(caller, media) ⇒ Array<Medium>
Populates a relationship which has many media.
**This method typically won’t be used except internally.**
40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/virtualbox/medium.rb', line 40 def populate_array_relationship(caller, media) relation = Proxies::Collection.new(caller) media.each do |medium| # Skip media this class isn't interested in next if device_type != :all && medium.device_type != device_type # Wrap it up and add to the relationship relation << new(medium) end relation end |