Class: StructuredReader::JSONReader::CustomReader
- Inherits:
-
Object
- Object
- StructuredReader::JSONReader::CustomReader
- Defined in:
- lib/structured_reader.rb
Instance Method Summary collapse
-
#initialize(**_, &blk) ⇒ CustomReader
constructor
A new instance of CustomReader.
- #read(fragment, context) ⇒ Object
Constructor Details
#initialize(**_, &blk) ⇒ CustomReader
Returns a new instance of CustomReader.
248 249 250 |
# File 'lib/structured_reader.rb', line 248 def initialize(**_, &blk) @read_action = blk end |
Instance Method Details
#read(fragment, context) ⇒ Object
252 253 254 |
# File 'lib/structured_reader.rb', line 252 def read(fragment, context) @read_action.call(fragment, context) end |