Method: Bfire::Group#take
- Defined in:
- lib/bfire/group.rb
#take(how_many = :all) ⇒ Object
Return the first how_many compute resources of the group.
151 152 153 154 155 156 157 158 159 160 161 |
# File 'lib/bfire/group.rb', line 151 def take(how_many = :all) case how_many when :all computes when :first computes[0] else raise ArgumentError, "You must pass :all, :first, or a Fixnum" unless how_many.kind_of?(Fixnum) computes.take(how_many) end end |