Sha256: 15de836a1dac53c837d090c2cbae0c8bcb7847428c72e9b1c4a37bd49e386c29
Contents?: true
Size: 683 Bytes
Versions: 16
Compression:
Stored size: 683 Bytes
Contents
# frozen_string_literal: true module EgovUtils module Iszr module Addresses class FetchForLegalPerson class FromSampleData < ActiveInteraction::Base string :remote_id def execute attrs = sample_results.detect do |address| address['remote_id'] == remote_id end EgovUtils::Address.new(attrs.except('remote_id')) end private def sample_results results = File.read( EgovUtils::Engine.root.join('lib/egov_utils/iszr/lp_addresses.json') ) JSON.parse(results) end end end end end end
Version data entries
16 entries across 16 versions & 1 rubygems