Sha256: 2f68f892f2491b39ea310468c0606d794535f6baafa51b0d230da81bfe979039

Contents?: true

Size: 323 Bytes

Versions: 1

Compression:

Stored size: 323 Bytes

Contents

module Georgia
  class ParseJsonTags

    def initialize params, key: :tag_list
      @params = params
      @key    = key
    end

    def call
      parse_json_tags!
      @params
    end

    private

    def parse_json_tags!
      @params[@key] = JSON.parse(@params[@key]) if @params.fetch(@key, nil)
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
georgia-0.8.0 app/services/georgia/parse_json_tags.rb