Sha256: 87e112ed51d477615053fd0d56da513ee02a3d97b24985bb3884b62479c41388

Contents?: true

Size: 321 Bytes

Versions: 7

Compression:

Stored size: 321 Bytes

Contents

require 'json'

module LinkShrink
  # @author Jonah Ruiz <jonah@pixelhipsters.com>
  # Wraps JSON class
  module JSONParser
    def self.included(base)
      base.extend self
    end

    def self.parse_json(data)
      JSON.load(data)
    end

    def self.cleanup_json(data)
      data.gsub(/\s+/, '')
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
link_shrink-0.0.8 lib/link_shrink/json_parser.rb
link_shrink-0.0.7 lib/link_shrink/json_parser.rb
link_shrink-0.0.6 lib/link_shrink/json_parser.rb
link_shrink-0.0.5 lib/link_shrink/json_parser.rb
link_shrink-0.0.4 lib/link_shrink/json_parser.rb
link_shrink-0.0.3 lib/link_shrink/json_parser.rb
link_shrink-0.0.2 lib/link_shrink/json_parser.rb