README.md in lens_protocol-0.1.0 vs README.md in lens_protocol-0.1.1
- old
+ new
@@ -6,34 +6,36 @@
[![Build Status](https://travis-ci.org/eeng/lens_protocol.svg?branch=master)](https://travis-ci.org/eeng/lens_protocol)
## Installation
-Add this line to your application's Gemfile:
-
```ruby
gem 'lens_protocol'
```
-And then execute:
-
- $ bundle
-
-Or install it yourself as:
-
- $ gem install lens_protocol
-
## Usage
### Parsing an OMA file
```ruby
require 'lens_protocol'
message = LensProtocol::OMA.parse(File.read('examples/oma/R360_1.oma'))
message.values_of('SPH') # => [1.25, -0.5]
```
-### Generating the tracing data SVG
+### Generating an OMA file
+```ruby
+message = LensProtocol::OMA.generate(
+ 'JOB' => 42,
+ 'SPH' => [1.25, -0.5]
+)
+puts message
+# =>
+# JOB=42
+# SPH=1.25;-0.50
+```
+
+### Generating the Tracing SVG
The `message.to_svg` method returns an array of SVG strings, one for each side, which can be used directly in an ERB template, like this:
```html
<div class="lenses-container">