Sha256: 72762a3cb6084ba55b6093fe1b5630ed06f7d8b72fc5e6ac6b2931d131e04811
Contents?: true
Size: 757 Bytes
Versions: 997
Compression:
Stored size: 757 Bytes
Contents
module Aws module Stubbing class StubData def initialize(operation) @rules = operation.output @pager = operation[:pager] end def stub(data = {}) stub = EmptyStub.new(@rules).stub remove_paging_tokens(stub) apply_data(data, stub) stub end private def remove_paging_tokens(stub) if @pager @pager.instance_variable_get("@tokens").keys.each do |path| key = path.split(/\b/)[0] stub[key] = nil end end end def apply_data(data, stub) ParamValidator.new(@rules, validate_required:false).validate!(data) DataApplicator.new(@rules).apply_data(data, stub) end end end end
Version data entries
997 entries across 997 versions & 2 rubygems