Class: LazyJson::Value
- Inherits:
-
Object
- Object
- LazyJson::Value
- Defined in:
- lib/lazy-json.rb
Instance Method Summary collapse
-
#initialize(seq) ⇒ Value
constructor
A new instance of Value.
- #parse ⇒ Object
Constructor Details
#initialize(seq) ⇒ Value
Returns a new instance of Value.
158 159 160 |
# File 'lib/lazy-json.rb', line 158 def initialize(seq) @seq = seq end |
Instance Method Details
#parse ⇒ Object
162 163 164 |
# File 'lib/lazy-json.rb', line 162 def parse Oj.load(@seq.to_s) # Note JSON.parse fails on primitives since they're invalid as documents end |