Class: Feedx::Format::JSON::Decoder
- Inherits:
-
Abstract::Decoder
- Object
- Abstract::Wrapper
- Abstract::Decoder
- Feedx::Format::JSON::Decoder
- Defined in:
- lib/feedx/format/json.rb
Instance Method Summary collapse
Methods inherited from Abstract::Decoder
Methods inherited from Abstract::Wrapper
Constructor Details
This class inherits a constructor from Feedx::Format::Abstract::Wrapper
Instance Method Details
#decode(target) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/feedx/format/json.rb', line 5 def decode(target, **) line = @io.gets return unless line target = target.allocate if target.is_a?(Class) target.from_json(line) target end |