Class: Geojsonlint::Parser
- Inherits:
-
Object
- Object
- Geojsonlint::Parser
- Defined in:
- lib/geojsonlint.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#schema ⇒ Object
readonly
Returns the value of attribute schema.
Instance Method Summary collapse
-
#initialize(data) ⇒ Parser
constructor
A new instance of Parser.
- #run ⇒ Geojson
Constructor Details
#initialize(data) ⇒ Parser
Returns a new instance of Parser.
17 18 19 20 21 22 |
# File 'lib/geojsonlint.rb', line 17 def initialize(data) @data = data @schema = JSON.parse(File.read(File.("../geojsonlint/geojson_schema.json", __FILE__))) self end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
14 15 16 |
# File 'lib/geojsonlint.rb', line 14 def data @data end |
#schema ⇒ Object (readonly)
Returns the value of attribute schema.
14 15 16 |
# File 'lib/geojsonlint.rb', line 14 def schema @schema end |