lib/config_scripts/seeds/seed_set.rb
# This method runs a block on each set that the app has defined.
#
# The block will be given one parameter, which is the seed set.
#
# @param [String] set_number
#   The number of the set that we should run.
#
# @return [Array]
This method runs a block on each set that the app has defined.
The block will be given one parameter, which is the seed set.
This method runs a block on each set that the app has defined . The block will be given one parameter which is the seed set .
def each_set(set_number=nil, &block)
          @registered_sets ||= {}
          self.load_seed_sets
          if set_number
            if self.registered_sets[set_number]
              block.call(self.registered_sets[set_number])
            end
          else
            self.registered_sets.keys.sort.each do |set_number|
              block.call(self.registered_sets[set_number])
            end
          end
        end
def each_set ( set_number = nil , & block ) @registered_sets ||= { } self . load_seed_sets if set_number if self . registered_sets [ set_number ] block . call ( self . registered_sets [ set_number ] ) end else self . registered_sets . keys . sort . each do | set_number | block . call ( self . registered_sets [ set_number ] ) end end end
This method runs a block on each set that the app has defined.
This method runs a block on each set that the app has defined .
None
Array
set_number
<not_specific>
block
<not_specific>
<not_specific>
set_number The number of the set that we should run.
set_number The number of the set that we should run .