module Scruber::Core::Extensions::Loop::CoreMethods
Public Instance Methods
add_dictionary(name, file_path, file_type)
click to toggle source
Registering dictionary in system
@param name [Symbol] name of dictionary @param file_path [String] path to file @param file_type [Symbol] type of file, :xml, :csv, etc..
@return [void]
# File lib/scruber/core/extensions/loop.rb, line 42 def add_dictionary(name, file_path, file_type) Scruber::Core::Extensions::Loop.add_dictionary(name, file_path, file_type) end
loop(dictionary, options={}, &block)
click to toggle source
Iterate records from dictionary
@param dictionary [Symbol] name of dictionary @param options [Hash] search conditions @param block [Proc] body, yields row of dictionary
@return [void]
# File lib/scruber/core/extensions/loop.rb, line 28 def loop(dictionary, options={}, &block) Scruber::Core::Extensions::Loop.loop dictionary, options do |*args| instance_exec *args, &block end end