Class: BulkImports::Groups::Extractors::SubgroupsExtractor
- Inherits:
-
Object
- Object
- BulkImports::Groups::Extractors::SubgroupsExtractor
- Defined in:
- lib/bulk_imports/groups/extractors/subgroups_extractor.rb
Instance Method Summary collapse
Instance Method Details
#extract(context) ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/bulk_imports/groups/extractors/subgroups_extractor.rb', line 7 def extract(context) encoded_parent_path = ERB::Util.url_encode(context.entity.source_full_path) response = http_client(context.configuration) .each_page(:get, "groups/#{encoded_parent_path}/subgroups") .flat_map(&:itself) BulkImports::Pipeline::ExtractedData.new(data: response) end |