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
573 574 575 |
# File 'lib/rtree.rb', line 573 def from_a(array) from_json(array.to_json) end |
.from_json(json) ⇒ RTree::Style
Create a new Style instance from JSON string
549 550 551 |
# File 'lib/rtree.rb', line 549 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
540 541 542 |
# File 'lib/rtree.rb', line 540 def json_read(io) super end |