Sha256: c2c2162c67c2993a0a9523ddf74563a369cef8eaa9ba25cca73f43cc574b68df

Contents?: true

Size: 217 Bytes

Versions: 5

Compression:

Stored size: 217 Bytes

Contents

module Kaui
  module PaymentMethodHelper

    def is_json?(value)
      result = JSON.parse(value)
      result.is_a?(Hash) || result.is_a?(Array)
    rescue JSON::ParserError, TypeError
      false
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
kaui-2.1.0 app/helpers/kaui/payment_method_helper.rb
kaui-2.0.4 app/helpers/kaui/payment_method_helper.rb
kaui-2.0.3 app/helpers/kaui/payment_method_helper.rb
kaui-2.0.2 app/helpers/kaui/payment_method_helper.rb
kaui-2.0.1 app/helpers/kaui/payment_method_helper.rb