Class: RTree::Style
- Inherits:
-
RTreeStyleBase
- Object
- RTreeStyleBase
- RTree::Style
- Defined in:
- lib/rtree.rb
Overview
A Ruby wrapper around RTree styles, used in PostScript plotting. in particular by #postscript.
Class Method Summary collapse
-
.from_a(array) ⇒ RTree::Style
(also: from_array)
Create a new Style instance from array of Hash.
-
.from_json(json) ⇒ RTree::Style
Create a new Style instance from JSON string.
-
.json_read(io) ⇒ RTree::Style
Create a new Style instance from JSON stream.
Class Method Details
.from_a(array) ⇒ RTree::Style Also known as: from_array
Create a new Style instance from array of Hash
571 572 573 |
# File 'lib/rtree.rb', line 571 def from_a(array) from_json(array.to_json) end |
.from_json(json) ⇒ RTree::Style
Create a new Style instance from JSON string
547 548 549 |
# File 'lib/rtree.rb', line 547 def from_json(json) deserialise(json, Encoding::UTF_8) { |io| json_read(io) } end |
.json_read(io) ⇒ RTree::Style
Create a new Style instance from JSON stream
538 539 540 |
# File 'lib/rtree.rb', line 538 def json_read(io) super end |