Class: StructuredReader::JSONReader::CustomReader

Inherits:
Object
  • Object
show all
Defined in:
lib/structured_reader.rb

Instance Method Summary collapse

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