Skip to content

Latest commit

 

History

History
63 lines (37 loc) · 1.61 KB

README.md

File metadata and controls

63 lines (37 loc) · 1.61 KB

SixArm.com → Ruby →
USPTO: United State Patent and Trademark Office

Gem Version Build Status Code Climate

Introduction

Provides a "Patent" class for working with USPTO Gazette XML.

See USPTO Bulk Downloads: Patent Grant Full Text:
http://www.google.com/googlebooks/uspto-patents-grants-text.html

For docs go to http://sixarm.com/sixarm_ruby_uspto/doc

Install

Gem

To install this gem in your shell or terminal:

gem install sixarm_ruby_uspto

Gemfile

To add this gem to your Gemfile:

gem 'sixarm_ruby_uspto'

Require

To require the gem in your code:

require 'sixarm_ruby_uspto'

Examples

require "sixarm_ruby_uspto"
require "nokogiri"

text = File.read("patent.xml")
doc = Nokogiri.XML(text)
patent = Patent.new(:doc => doc)

patent.id #=> "US1234"
patent.date #=> "20120101"
patent.claims #=> XML element of claim items