Class: IMW::Serializer::JsonSerializer
- Inherits:
-
Object
- Object
- IMW::Serializer::JsonSerializer
- Defined in:
- lib/imw/serializer/json_serializer.rb
Instance Method Summary collapse
-
#initialize(file_url, mode) ⇒ JsonSerializer
constructor
A new instance of JsonSerializer.
- #write(line) ⇒ Object
Constructor Details
#initialize(file_url, mode) ⇒ JsonSerializer
Returns a new instance of JsonSerializer.
5 6 7 8 9 |
# File 'lib/imw/serializer/json_serializer.rb', line 5 def initialize file_url, mode @file_url = file_url @mode = mode File.open(file_url, mode) end |
Instance Method Details
#write(line) ⇒ Object
11 12 13 |
# File 'lib/imw/serializer/json_serializer.rb', line 11 def write line File.write(line) end |