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.
242 243 244 |
# File 'lib/structured_reader.rb', line 242 def initialize(**_, &blk) @read_action = blk end |
Instance Method Details
#read(fragment, context) ⇒ Object
246 247 248 |
# File 'lib/structured_reader.rb', line 246 def read(fragment, context) @read_action.call(fragment, context) end |