class ArcServer::Graphics::Feature
Attributes
attributes[RW]
geometry[RW]
Public Class Methods
create(json)
click to toggle source
# File lib/arcserver/graphics/feature.rb, line 12 def self.create(json) parsed = (json.is_a?(Hash) ? json : JSON.parse(json)).with_indifferent_access Feature.new({ geometry: ArcServer::Geometry::Geometry.create(parsed['geometry']), attributes: parsed['attributes'] }) end
new(attr={})
click to toggle source
# File lib/arcserver/graphics/feature.rb, line 7 def initialize(attr={}) @geometry = attr[:geometry] @attributes = attr[:attributes] || { } end